Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: kunaldgr8 on February 13, 2012, 03:51:47 AM

Title: voice recogination robot given by admin
Post 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?
Title: Re: voice recogination robot given by admin
Post by: joe61 on February 13, 2012, 07:44:13 AM
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
Title: Re: voice recogination robot given by admin
Post by: kunaldgr8 on February 13, 2012, 08:00:26 AM
what should i do  :o :o :o :o
Title: Re: voice recogination robot given by admin
Post by: joe61 on February 13, 2012, 11:10:41 AM
Are you asking how to port the code? How familiar are you with C and Arduino programming?

Joe
Title: Re: voice recogination robot given by admin
Post by: Admin on February 15, 2012, 10:35:52 AM
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
Title: Re: voice recogination robot given by admin
Post by: kunaldgr8 on February 15, 2012, 11:14:53 AM
i didnt get the hint what do you mean by
hint: you must use a software UART for the Arduino for it to work
Title: Re: voice recogination robot given by admin
Post by: Admin on February 15, 2012, 11:41:32 AM
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.
Title: Re: voice recogination robot given by admin
Post by: kunaldgr8 on February 16, 2012, 03:45:19 AM
you mean rx and tx
Title: Re: voice recogination robot given by admin
Post by: Admin on February 16, 2012, 03:48:48 AM
you mean rx and tx
Yeap, those are the two pins for the UART. :P
Title: Re: voice recogination robot given by admin
Post by: kunaldgr8 on February 16, 2012, 10:27:00 AM
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
Title: Re: voice recogination robot given by admin
Post by: Admin on February 16, 2012, 10:30:35 AM
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
Title: Re: voice recogination robot given by admin
Post by: kunaldgr8 on February 16, 2012, 11:04:55 AM
ya now i realize that that axon is far better
but how to creat software uarts  :D
Title: Re: voice recogination robot given by admin
Post by: Admin on February 16, 2012, 11:11:18 AM
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