Society of Robots - Robot Forum

Software => Software => Topic started by: Hassan on September 15, 2010, 06:31:53 PM

Title: getting started with the axon
Post by: Hassan on September 15, 2010, 06:31:53 PM
Hello everyone,

I'm planning to buy the axon MCU soon, so i thought i'd learn a thing or two before i get it, got some few questions:

1. what is webbotlib? is it needed to program the axon?

2. i believe robot programming depends on 2 main things: commanding motors to move and receiving data from sensors, so my question is, how to do these? for example, lets say i have a light sensor in pin 00, is there a function like: GetPinValue ( PIN_00 )? same with motors, is it that simple? (i'm pretty sure it's not)

3. what is a UART used for? and how is it used?

4. Let's say, i want my robot to be a "card reader", a couple of sensors reading some data from a card and sending it to the program, is there a way to dump the received data to a text file on my computer? (whether wireless or with a USB plugged - doesn't matter), i have made a program that reads a text file and displays some stuff on screen regarding the info received (like rejected or accepted, etc), i believe it has something to do the the UART?

Thanks for reading
Regards
Hassan
Title: Re: getting started with the axon
Post by: knossos on September 15, 2010, 07:27:22 PM
1. what is webbotlib? is it needed to program the axon?
Webbotlib is a library of functions for programming various Atmel based microcontrollers, which includes the Axon.  It is not needed but it does simplify things.

Quote
2. i believe robot programming depends on 2 main things: commanding motors to move and receiving data from sensors, so my question is, how to do these? for example, lets say i have a light sensor in pin 00, is there a function like: GetPinValue ( PIN_00 )? same with motors, is it that simple? (i'm pretty sure it's not)
Using webbotlib greatly simplifies these kind of functions.  An example line (taken from the Photovore code (http://webbot.org.uk/WebbotLibDocs/27787.html) on Webbotlib) for reading data from a sensor:

uint8_t lightLeft = a2dConvert8bit(sensorLeft);

Motors will depend on if you are using motors or servos, but once again Webbotlib can simplify this as well.

Quote
3. what is a UART used for? and how is it used?
UART is for serial data communication.  See the SoR tutorial on UART (http://www.societyofrobots.com/microcontroller_uart.shtml).

Quote
4. Let's say, i want my robot to be a "card reader", a couple of sensors reading some data from a card and sending it to the program, is there a way to dump the received data to a text file on my computer? (whether wireless or with a USB plugged - doesn't matter), i have made a program that reads a text file and displays some stuff on screen regarding the info received (like rejected or accepted, etc), i believe it has something to do the the UART?

UART can be used to send data to a computer.  And wouldn't you know it?   At the bottom of the UART tutorial is a link to yet another of Admins wonderful tutorials on how to send data to a PC using UART (http://www.societyofrobots.com/microcontroller_uart_50_robot.shtml).

Sorry for not being more detailed, I'm currently awaiting my parts for my robot, but most of what I have learned has been thanks to Admins tutorials and the SoR forums.  Look around a little, you'll be surprised at how much info is available.
Title: Re: getting started with the axon
Post by: Hassan on September 15, 2010, 09:00:10 PM
Well thanks for your info, im glad to know that it's possible to send data to a computer.

i've seen this source code from webbotlib, well what if im not using this library? any link to a tutorial without it? dunno but i feel like i want to make my own
Title: Re: getting started with the axon
Post by: knossos on September 16, 2010, 02:11:42 AM
Have you looked at this SoR tutorial (http://www.societyofrobots.com/axon/axon_function_list.shtml)? I'll see what else I can find for you.  If nothing else, when I get my Axon I'll post something after I have had a chance to play around with it.  In the mean time you can take a look at this cheat-sheet for the Arduino (http://sites.google.com/site/mechatronicsguy/arduinocheatsheet/Arduino%20cheet%20sheet%20v02bsmall.png).  I'm not sure how compatible it is with the Axon but since both are Atmel processor based it should at least give you some ideas.
Title: Re: getting started with the axon
Post by: Hassan on September 16, 2010, 05:50:22 AM
Have you looked at this SoR tutorial (http://www.societyofrobots.com/axon/axon_function_list.shtml)? I'll see what else I can find for you.  If nothing else, when I get my Axon I'll post something after I have had a chance to play around with it.  In the mean time you can take a look at this cheat-sheet for the Arduino (http://sites.google.com/site/mechatronicsguy/arduinocheatsheet/Arduino%20cheet%20sheet%20v02bsmall.png).  I'm not sure how compatible it is with the Axon but since both are Atmel processor based it should at least give you some ideas.

I have seen that tutorial, wondering whether it uses webbotlib or not, does it?
Title: Re: getting started with the axon
Post by: knossos on September 16, 2010, 08:15:34 AM
I haven't looked through all the code, but what I glanced at had some AVRlib stuff but no webbotlib.
Title: Re: getting started with the axon
Post by: Admin on September 16, 2010, 03:32:46 PM
The code that comes with the original Axon isn't WebbotLib based, and is no longer maintained (ie lacks many features). Its based on AVRlib and works fine, though. WebbotLib is compatible with the original Axon.

I *strongly* recommend using WebbotLib even if you're an expert - it makes things waaaay easier to do. ;D