fezder
Well-Known Member
Ok, so the problem now is this:
I have sim800L module, that i've succeded to get working, was quite chore to program....but now I'm trying to implment it to arduino/teensy!
And in case someone wonders, this is not part of any project yet, just learning how to use it
.
I have code that I'm planning to use as hard-base, but I think carrion return and/or newline causes trouble, my current code is as like this:
AT-command gives ok as return, and it should light up led, just a test skecth for now (Sending AT-command doesn't cost anything so good for starters)
and this is the output that module shoots out, OK as excpected, and ERROR just for reference

So, how should those CRLF after returning stuff from sim800 should be implemented to code?
Sorry if this was confusing, ask if need arises!
I have sim800L module, that i've succeded to get working, was quite chore to program....but now I'm trying to implment it to arduino/teensy!
And in case someone wonders, this is not part of any project yet, just learning how to use it
I have code that I'm planning to use as hard-base, but I think carrion return and/or newline causes trouble, my current code is as like this:
AT-command gives ok as return, and it should light up led, just a test skecth for now (Sending AT-command doesn't cost anything so good for starters)
C:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
String a;
int ledpin=13;
void setup()
{
pinMode(ledpin,OUTPUT);
Serial.begin(9600); //harware serial
mySerial.begin(9600); //bluetooth module, for sending AT-commands
}
void loop() {
//while(Serial.available()) //seems not needed afterall, at least not yet
//{
a= mySerial.readString(); //data from bluetooth
Serial.println(a);
if(a=="OK ")
{
digitalWrite(ledpin,HIGH);
}
else
{
digitalWrite(ledpin,LOW);
}
//}
}

So, how should those CRLF after returning stuff from sim800 should be implemented to code?
Sorry if this was confusing, ask if need arises!