Hi all,
I am using the teensy 3.0 with the teensyduino IDE add-on. I have been trying to establish a serial connection to a sim900 breakout board I purchased a few months ago (this model http://store.open-electronics.org/Breakout/GSM Breakout/Breakout SIM900 GSM Module ).
Once the sim900 powers up I successfully receive this in the serial monitor
RDY
+CFUN: 1
+CPIN: READY
+PACSP: 1
Call
Though the problem is when I try and send an AT command to the module such as "AT". The module always sends back gibberish.
In particular sending "AT" cause the module to respond with
|,
My code
It would seem to me that the problem is sending from the teensy not receiving. Please note that I have successfully used a 3.3 volt Arduino to interface with this module using very similar code and when sending "AT" the response was "OK". Have I implemented the teensy's serial function incorrectly? Why can I only receive?
Thanks
I am using the teensy 3.0 with the teensyduino IDE add-on. I have been trying to establish a serial connection to a sim900 breakout board I purchased a few months ago (this model http://store.open-electronics.org/Breakout/GSM Breakout/Breakout SIM900 GSM Module ).
Once the sim900 powers up I successfully receive this in the serial monitor
RDY
+CFUN: 1
+CPIN: READY
+PACSP: 1
Call
Though the problem is when I try and send an AT command to the module such as "AT". The module always sends back gibberish.
In particular sending "AT" cause the module to respond with
|,
My code
Code:
char incomingByte;
char incomingComp;
void setup() {
pinMode(8,OUTPUT);
Serial.begin(9600);
Serial1.begin(2400);
digitalWrite(8, HIGH); //power on for sim900 on d8
delay(1200);
digitalWrite(8, LOW);
delay(10000);
}
void loop()
{
if(Serial.available() > 0) { //print data from computer to sim900
incomingComp = char(Serial.read());
Serial1.print(incomingComp);
}
if (Serial1.available() > 0) { //print data from sim900 to computer
incomingByte = char(Serial1.read());
Serial.print(incomingByte);
}
}
It would seem to me that the problem is sending from the teensy not receiving. Please note that I have successfully used a 3.3 volt Arduino to interface with this module using very similar code and when sending "AT" the response was "OK". Have I implemented the teensy's serial function incorrectly? Why can I only receive?
Thanks