N0nny
1
My code appears to be working.
But instead of getting something along the lines of "Rdy".. I get random symbols:
����bB�b&�bb&@�$@bb��$��b
The code runs in 9600, and I'm using the built in Serial Monitor on my Mac.
What do I need to change to get normal character outputs?
Delta_G
2
Do you have the serial monitor set to the same baud rate as the program is using? Not having those match is the usual cause for what you see.
N0nny
3
The program and the Monitor are both set to 9600.
Delta_G
4
Then you need to show the code that you're using. A screenshot of the Serial monitor would be nice here too.
N0nny
5
Yes, sorry, here is the code:
#include <sim900_Suli.h>
#include <SoftwareSerial.h>
#include <Wire.h>
#include <Suli.h>
const int pin_tx = 7;
const int pin_rx = 8;
SoftwareSerial gprs(pin_tx,pin_rx);//TX,RX
void setup(){
Serial.begin(9600);
sim900_init(&gprs, -1, 9600);
}
void loop(){
if(gprs.available()){
Serial.write(gprs.read());
}
if(Serial.available()){
gprs.write(Serial.read());
}
}
And the Serial Monitor is in the attached image
So it's only writing what the gprs sends out to you?
Add this line at the end of setup and see if it prints right. If it does then its the gprs that's sending the bad data.
void setup(){
Serial.begin(9600);
sim900_init(&gprs, -1, 9600);
Serial.println("Beginning Program");
}
N0nny
7
Okay!
Thank you, I have added that line, and it has printed.
Is it possible to fix the data that the GPRS is sending?
N0nny:
Is it possible to fix the data that the GPRS is sending?
Surely. Now if we only knew what gprs you had or some details about it we might be able to help with that.