ArduinoGeneral

Romeo V2.2 Serial/Soft Serial not working

userHead Account cancelled 2015-10-15 11:03:22 1577 Views1 Replies
Has anyone had issues on the Romeo V2 board, getting Software Serial or even just regular Serial (D0/D1 pins) working? USB works fine, but when I try to use either the DF-Bluetooth V3 (baudrate 9600), or the Makeblock ME Bluetooth Module (baudrate 115200), I get no response. I have tried swapping TX/RX pins. I can connect to both bluetooth modules successfully via MATLAB commands:

fsweb=instrhwinfo('Bluetooth');
bt=Bluetooth('Bluetooth_V3',1);
***OR for makeblock, bt=Bluetooth('Makeblock',1);****
fopen(bt);
fwrite(bt,'1');

This works successfully with an Arduino UNO, and the Makeblock ME Bluetooth module. However I haven't even been able to get the DF-Bluetooth V3 to work with the UNO at all. As far as the Romeo V2, I have even tried plugging the DF-Bluetooth V3 into the bluetooth pins it is designed for, and there is still no response? Everything else (PWM, AnalogRead) works on the Romeo board, but no Serial??? Here is the code I'm using to debug, it works for USB serial. AT mode switch is OFF, LED switch is ON. Tried also with battery power and no USB connected.

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
int timeOn;

void setup()
{   
mySerial.begin(9600);   
Serial.begin(9600);
}
 
void loop()
{
if (mySerial.available())
{
timeOn = mySerial.parseInt();

analogWrite(9, 100);
delay(timeOn * 1000);
}
if (Serial.available())
{
timeOn = Serial.parseInt();
analogWrite(9, 100);
delay(timeOn * 1000);
}
digitalWrite(9, HIGH);
}
2015-10-15 18:07:56 Hello,

Welcome!

I've replied your email.

Note for other people:

Romeo use Serial1.*** instead of Serial.*** for serial port Pin0/1 to communicate.
userHeadPic Leff