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
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);
}