I have a custom board with a 328P running at 3.6V and using the internal oscillator at 8MHz .
I am using the ATmega328 on a breadboard (8MHz internal clock) bootloader.
I am using SoftwareSerial (Rx D10 / Tx D11).
Baud rate is 9600 on the SoftwareSerial and also on the remote Sigfox device.
According to the Sigfox device datasheet I should receive: Example Response: 00012345 (HEX)
However, my Serial Monitor displays:
⸮⸮⸮⸮2⸮9457D8
⸮⸮⸮⸮2⸮9457D8
⸮⸮⸮⸮2⸮9457D8
⸮⸮⸮⸮2⸮9457D8
⸮⸮⸮⸮2⸮9457D8
⸮⸮⸮⸮2⸮9457D8
My Code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
byte myByte;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
pinMode(6, OUTPUT);// Set RF Module port
digitalWrite(6, LOW);// Switch RF Module Mosfet ON
delay(2000);
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
// mySerial.println("AT$I=10");
delay(100);
}
void loop() { // run over and over
mySerial.println("AT$I=11");
delay(2000);
if (mySerial.available()) {
String MyData = (mySerial.readStringUntil('\r'));
Serial.println(MyData), HEX;
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}