AltSoftSerial Project Help

Status
Not open for further replies.

bdor5285

New member
Hi,
I am using an arduino UNO with a Atlas Scientific ENV-32x data logger.
I want the arduino to send strings to the data logger, using software serial so it will work without PC connection.

So just a basic intro, if the button is pressed on pin 5, the arduino should send "D" to the data logger, this command will delete the logger memory.
Unfortunately, it seems like the data isnt making its way to the data logger for reasons I dont understand. (the logger has an LED that blinks when it receives data.)

PS(All my wiring has been checked working, and the hardware is not broken.)

Check out my code below.
Thanks


Code:
#include <AltSoftSerial.h>

AltSoftSerial altSerial;

const int delBtn = 5;  
int buttonStateDel = 0; 


void setup() {
  
  pinMode(delBtn, INPUT); 
  
  Serial.begin(38400);
  Serial.println("AltSoftSerial Test Begin");
  altSerial.begin(38400);
}

void loop() {
  char c;
  byte cmd;
  buttonStateDel = digitalRead(delBtn);
  
  
  if (buttonStateDel == HIGH) {



        Serial.println("Del"); 

        altSerial.print("D");
  
  }
  

  
  if (altSerial.available()) {
    c = altSerial.read();
    Serial.print(c);
  }
  
  delay(500);
}
 
Using the example in the altsoftserial library I was able to check the wiring by sending data to and from the device using serial. After speaking to a representative from the company I was told that the included SoftSerial is not sufficient for use with this device.
 
The support person I spoke with explained that this software does not work with the newest logger. I tried it and can garunteed that it doesn't.
 
Could you paste your circuit diagram and photo of actual connections?

And also when you are sending any data you also have to send a 'Carriage Returns' i.e. <CR>. Remember in order to format the previous data you need to send "D<CR>D<CR>".
 
Last edited:
Status
Not open for further replies.
Back
Top