Author Topic: getting started with the axon  (Read 1020 times)

0 Members and 1 Guest are viewing this topic.

Offline HassanTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
getting started with the axon
« 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

Offline knossos

  • Robot Overlord
  • ****
  • Posts: 278
  • Helpful? 14
Re: getting started with the axon
« Reply #1 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 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.

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.

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.
« Last Edit: September 15, 2010, 07:31:01 PM by knossos »
"Never regret thy fall,
O Icarus of the fearless flight
For the greatest tragedy of them all
Is never to feel the burning light."
 
Oscar Wilde

Offline HassanTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: getting started with the axon
« Reply #2 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
« Last Edit: September 15, 2010, 09:15:05 PM by Hassan »

Offline knossos

  • Robot Overlord
  • ****
  • Posts: 278
  • Helpful? 14
Re: getting started with the axon
« Reply #3 on: September 16, 2010, 02:11:42 AM »
Have you looked at this SoR tutorial? 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.  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.
"Never regret thy fall,
O Icarus of the fearless flight
For the greatest tragedy of them all
Is never to feel the burning light."
 
Oscar Wilde

Offline HassanTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: getting started with the axon
« Reply #4 on: September 16, 2010, 05:50:22 AM »
Have you looked at this SoR tutorial? 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.  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?

Offline knossos

  • Robot Overlord
  • ****
  • Posts: 278
  • Helpful? 14
Re: getting started with the axon
« Reply #5 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.
"Never regret thy fall,
O Icarus of the fearless flight
For the greatest tragedy of them all
Is never to feel the burning light."
 
Oscar Wilde

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: getting started with the axon
« Reply #6 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

 


Get Your Ad Here