Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: kunaldgr8 on February 13, 2012, 03:51:47 AM
-
i am making vr robot posted on instructable (http://www.instructables.com/id/Voice-Control-Robot-in-7-Minutes/?ALLSTEPS (http://www.instructables.com/id/Voice-Control-Robot-in-7-Minutes/?ALLSTEPS)) where admin has given his full commented source code ..so when i open the apps. file three more files open with it the vr_libary file,hardware file and vr_axon_demo file.....i am using arduino so i was thing of coping file from the avr studio and pasting it in arduino ide so ....which file should i copy and will this idea work?
-
I'd be surprised if it did work. Two different processors, different board layouts, Arduino doesn't let you have a main(), etc.
You'd have to port the code to Arduino most likely.
Joe
-
what should i do :o :o :o :o
-
Are you asking how to port the code? How familiar are you with C and Arduino programming?
Joe
-
You will have to rewrite your Arduino code from scratch, using the Arduino library code set.
But it's not that hard as you have my working example code to go by. Try to understand my software, staring at it for half an hour or so until it makes sense :P
hint: you must use a software UART for the Arduino for it to work
-
i didnt get the hint what do you mean by
hint: you must use a software UART for the Arduino for it to work
-
i didnt get the hint what do you mean by
hint: you must use a software UART for the Arduino for it to work
To communicate with the VRbot, you need a UART to transfer serial data.
The Axon has four hardware UARTs, with one attached to USB. Hardware UARTs are very fast, reliable, and don't tie up your processor.
The Arduino has only one hardware UART, and it's already attached to USB. So you must use whats called a 'software UART' - they are slow, not so reliable, and waste processor time. WebbotLib does a good job handling software UARTs, but nothing can beat a hardware UART.
-
you mean rx and tx
-
you mean rx and tx
Yeap, those are the two pins for the UART. :P
-
if i want to connect a serial lcd and as well as vrbot... but rxd port is only 1 what to do ...should i connect both in single port
-
if i want to connect a serial lcd and as well as vrbot... but rxd port is only 1 what to do ...should i connect both in single port
You need a different UART for every device that requires one. You can create as many software UARTs as you like, just remember they are extremely slow so if you have many it will take up all your processor time.
There is a reason the Arduino is cheaper than the Axon, ie it lacks a lot of features :P
-
ya now i realize that that axon is far better
but how to creat software uarts :D
-
but how to creat software uarts :D
If you use WebbotLib, it's just drag-n-drop with Project Designer.
If you use the Arduino library, you can find code examples online. Just search around - you aren't the first with this problem :P