ArduinoGeneral

Romeo and XBee problem

userHead klausenlie 2017-06-21 00:16:34 3016 Views5 Replies
Hi!

I have bought a DFRobot and the Romeo V2 unit. I also have a couple of Xbee units. I would like to communicate with my robot over the xbees and control it via a program I have uploaded on the Romeo. I have used the standard program that makes you control it via the w, s, a and d keys on the keyboard.
I have managed to get the two xbees to communicate when they are on the adapter modules I use from MaxSteam, via XCTU, but when I move the xbee end device over on the Romeo I don`t get any motor movement on the robot.

Can someone help me with this and take this as a starting point?
2017-12-14 23:50:40 You don't need to use such a high voltage, since the input voltage range is 6-20V.
You can write a code about read the serial of the slave Romeo to see if you press "w", the serial will output the right letter.
If the serial communication is good, you can use the slave Romeo to test when write a "w" in this romeo's serial, the motor will rotate.
userHeadPic robert.chen
2017-12-13 04:21:48 Hi Robert!

I am back to the robot now after sometime on a different project and now when I try to recap some of the things I did last time I`m not sure what I`m doing wrong.

First of all I supply 10 volts with a power supply, but I\ m not sure if that is enough.

The two Xbees communicate serially with eachother, that is confirmed.
But when I place one of the XBees on the Romeo and try to serialize the letters mentioned earlier, over to it from a laptop, the motors connected to the romeo won`t start.

I can see that the Romeo receives the command by the white light that lights up on the board, but no engine movement.

I haven`t tested with a higher voltage, like 23 volts....I will.

But is this behaviour a symptom of somethings else.

I supply the voltage and have the motor switch set to ON.

Tommy
userHeadPic klausenlie
2017-06-22 01:47:01 Hi, since you have mentioned you want w, s, a and d keys to control move forward, move back, turn left and turn right. In your code, you should make your Romeo's serial read the char you define. For example,
char a = serial1.read();
if ( a == "w"){ left motor count-clock rotate, right motor clock rotate}
...
I am not sure what "0.5A pull" you mean
userHeadPic robert.chen
2017-06-21 01:11:39 Hi. Thank you for your fast answer.

I got it to work now, just a couple of minutes ago by using the Serial1 instead of Serial. How come I haven`t figured out yet.

I am running the robot on a power supply. I haven`t got any batteries yet, because I haven`t found the specs yet.

It currently runs when I turn on the power. It shouldn`t should it.

I can see a 0.5 A pull when I run it. Is that OK?
userHeadPic klausenlie
2017-06-21 01:04:37 Have you test your parts separately? like when you plug the Xbee to Romeo, and use the serial monitor to see if you give some command, the serial monitor would print any information. if it works, you can program the code about control the motors userHeadPic robert.chen