ArduinoGeneral

Trouble involving DFRduino (Romeo All in One 1.1) motor control and Serial Comm

userHead osvandre 2012-12-18 12:25:58 10619 Views9 Replies
Hello everybody.

We are in trouble about using a Romeo All in One 1.1 Internal Motor Control jointly Serial Communication. The problem is that when we are using this feature the program seems to become unable to properly communicate, mainly if we intend to read strings instead of one char at a time.

Somebody knows if this represents a limitation of the system board or if there is an specific way to deal with this issue?

Thank´s in advance!

Regards.

Osvandre
2013-01-10 23:03:26 I guess the only why to solve this problem is modified the IR library used to change the timer used. :P
If you get familiar with the atmega328 register setting, it should be very fast to achieve.

Regards,
Lauren
userHeadPic Lauren
2013-01-10 09:52:39 Hello everybody !!!!

I wish you a happy new year !!! ;D

@Lauren

Have you a solution to my problem ?

have a nice day

jidepe from France
userHeadPic jidepe
2012-12-27 22:23:57 It looks like a prototype of the remote control road barrier. ;D
Cool application.

Regards,
Lauren
userHeadPic Lauren
2012-12-27 05:36:33 Hello !

@Lauren

[b]Thanks !!!!!![/b]

[b]1.Which IR sensor are you using?[/b] [i]I'm using the DFrobot IR sensor DFR0094[/i]
[b]2.And could you please post your code also? [/b][i]yes, of course, also, it's here : [url=http://jdplanterose.info/page25.html]http://jdplanterose.info/page25.html[/url][/i]
[b]3.Do your IR sensor and servo work fine standalone? [/b][i]yes, they work nice ! I've make the same project, with the sames sensors and servo with a Mega 2560 and it's working very well (just a little vibration when servo stops)[/i]
[b]If you're using the IR sensor work with a IR remote controller, I guess the problem maybe that your IR decode library change the timer configuration then cause some problem for your servo library based on the Arduino timer.[/b] [i]Have you got a solution ? It's strange, because with my Mega, it's OK with same code and same project...[/i][i][/i]

[b]For information, I used Minibloq to programming.[/b][i][/i]

Have a nice day,

jidepe
userHeadPic jidepe
2012-12-21 19:29:59 @Osvandre
:D Glad to hear that! Happy hacking!
BTW, would you like to share the basic codes to help the other guys met with the similar problem?  ;D
userHeadPic Lauren
2012-12-21 17:20:54 Hello Lauren.

According to your support I used Serial.readBytesUntil(...) instead of Serial.read(). Then, I also change the algorithm about reading and interpreting commands from Serial Communication.

Your suggestion was useful!

Now the communication of strings and the motor control via Romeo Motor Driver is working fine together!

Thank´s a lot!!!
userHeadPic osvandre
2012-12-20 19:04:58 @jidepe
1.Which IR sensor are you using?
2.And could you please post your code also?
3.Do your IR sensor and servo work fine standalone?
If you're using the IR sensor work with a IR remote controller, I guess the problem maybe that your IR decode library change the timer configuration then cause some problem for your servo library based on the Arduino timer. :-\
userHeadPic Lauren
2012-12-20 11:04:31 hello,

I've got a problem wtih my Romeo 1.1 and IR sensor with Servo.

When I want to use the IR to run Servo, the servo don't move (but I tested DEL13 and it's works)...

Have you a solution ?

Thanks

jidepe from France
userHeadPic jidepe
2012-12-19 20:33:32 Hi Osvandre,

I think the motor control function won't affect the serial communication of your microcontroller considering that there's no hardware interface conflict.
The easiest way to figure out and make it work in my mind is that try to run the sample sketch in the wiki page of the Romeo, which drive the motors via USB commands('a','s','w','d','x',etc). Then improve the code based on the Arduino serial library functions like Serial.readBytesUntil(). This function is useful to improve the sample code from wiki page to be available to receive and decode the string from USB instead of the single char.
Please take a look at the links below. Hope it's helpful. ;)

[url=https://www.dfrobot.com/wiki/index.php?title=DFRduino_Romeo-All_in_one_Controller_V1.1(SKU:DFR0004)]https://www.dfrobot.com/wiki/index.php?title=DFRduino_Romeo-All_in_one_Controller_V1.1(SKU:DFR0004)[/url]
[url=http://arduino.cc/en/Serial/ReadBytesUntil]http://arduino.cc/en/Serial/ReadBytesUntil[/url]

Regards,
Lauren
userHeadPic Lauren