0
$\begingroup$

I use Arduino Uno R3 connected to the Roomba Create 2 as in this picture

Arduino to Roomba connection

All the output commands for Arduino work fine but I have a problem from reading data from Create 2 sensors: I get invalid/wrong sensor sensor data every approximately 2 minutes.

So I tried to test with an empty program to check the incoming data from Roomba.

This is the code:

#include <SoftwareSerial.h>
#include "roombaDefines.h"

int rxPin=10;  //yellow
int txPin=11;  //green 
byte data1 ;
SoftwareSerial Roomba(rxPin,txPin);

void setup() 
{
  Roomba.begin(19200);
  Serial.begin(9600);

  pinMode(ddPin, OUTPUT);
  delay(1000);

  wakeUp ();   // Wake-up Roomba
  startSafe(); // Start Roomba in Safe Mode
  playSound(1);
  setPowerLED(128,255);
  Serial.println("Start");
}

void loop() 
{

 while(Roomba.available()>0)
 {
  data1 = Roomba.read();
  Serial.println(data1);
 }

}

and I got this from Serial monitor approximately every two minutes

Start
32
32
32
32
70
108
97
115
104
32
67
32
115
117
99
99
101
115
115
102
117
108
58
32
48
120
48
32
40
48
120
48
41
10
13

I think this is the cause of the error in reading the sensor data.

Did anyone have this problem before ? How can I avoid this and read correct sensor data from Roomba ?

I see from another post that somebody had the same issue as me, see iRobot Create 2 Flash CRC message

Screenshot of previous post

but I already tried op code 128 to start Roomba in OI mode and it still have the same issue

$\endgroup$
  • $\begingroup$ I got this from Serial monitor .... what exactly are you referring to? .... what were you expecting to see? ..... what do those digits signify? $\endgroup$ – jsotola Sep 1 '18 at 3:03
  • $\begingroup$ also, please delete the picture of the output values and post the actual text so that it can be copied $\endgroup$ – jsotola Sep 1 '18 at 3:04
  • $\begingroup$ Thx for you advice what i was expecting is the Roomba should not send back any data to arduino because i didn't send any command to it $\endgroup$ – user3505317 Sep 3 '18 at 3:00
1
$\begingroup$

It is a message.

See this page.

https://en.wikipedia.org/wiki/ASCII#Printable_characters

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.