I'm working on a project and I'm not familiar with the Axon MC, I have 2 motors and for now I need to get the motors go back and forward. I have no clue how to setup this MC. I read and watched the Webbotlib but i do not know if i can use that on Axon I or not.Do i need a motor controller or can i just use some BJT's on a breadboard and go from MC to breadboard than to motors.\I just have no clue where to start at?Thank you in advance for the helps.

It'll load up a picture of the Axon. Now on the left you'll see a list of 'Devices' . . . open up 'Actuators' and choose what you want.

If you are just using servos, choose 'Servo Driver'. The others are for various types of motor drivers. If you don't have a servo, you'll need to get a motor driver. I personally recommend the Sabertooth by DimensionEngineering.com.

it works again. Thank you so much. For some reason though the code i generate from webbot, does not move my motors. I don't know where i'm doing wrong.All i do is drag and drop the sabertooth on the webbot project, then set it up. generate the code, using avr studio build a .hex file and using fboot upload it to axon MC. after rebooting the device it does not do anything. suppose to go 10 sec. front and all that.

Dont forget that when you run Tools|Generate for the first time then it creates your main C file.Subsequent Tools|Generate will leave your main C file alone (otherwise it might delete all of the code that you have added by hand). Instead it writes the code into example.txt. So take a look in that file and compare (or cut/paste) the code into your main C file. Recompile and upload.

ohhh i didn't know that. ( NEWBIE ) I always just build the .c file right away without comparing the example txt, weLL i will try it tonight when i get home.Thank you so much for the help btw, lot of helpful people in here. Appreciate it a lot.

As far as I can tell it may just be a digital sensor:The sensor output is logic high when an object falls within the detection range (15cm). When no object is inside the detection range, a logic low is output. In which case you could just add it as a basic Digital Input Pin.

It works only 3,4 times then jumps out of loop and just keeps going forward. Then I turn it off then turn it on again and it won't work at all.Reboot again and it works for 3,4 times getting the sensor read and work, then gets out of while loop i assume because it keeps going forward after couple interrupts.

that's another problem !yes it is impossible to jump out of this code but like sensors read 2,3 times and gets the motors activated as it suppose to do. but after few times, even thought motor dont suppose to run, it just starts to go forward forever.if i do print things i can't read it because i don't know how to simulate it. all i do is generate the hex file and upload it to the MC. Don't know how to read it back using print commands.

Your calls to act_setSpeed may not be doing what you think.The library expects a value in the range -127 to 127 where:--127 = full reverse0 = stop+127 = full forward

Also you just chose a distance sensor at random and then said 'it works'. I'm guessing what you meant was 'it compiles' - which of course it would do. Which sensor 'exactly' did you use?

Follow admins advice about adding rprintf statements and once you've got it sending stuff to your PC then also add a 'distanceDump(distance);' This will dump out the value returned by the sensor and I'll bet it is giving weird values.

well I just used the top IR sensor from the webbot project designer. but i thought it would be wrong then i used just a basic digital output which is only 0 and 1 and its still doing the same thing.im gonna try that hyperterminal and let you guys know again.

for the values, motor 2 is reverseable,Motor #1 is0-127 where 127 is full forward and 0 stopsMotor#2 is reversable and128-255 where 128 is full forward and 255 stops

for the values, motor 2 is reverseable,Motor #1 is0-127 where 127 is full forward and 0 stopsMotor#2 is reversable and128-255 where 128 is full forward and 255 stops

What you are probably telling us is what the motor controller you are using is expecting. The whole point of WebbotLib is you dont need to know that - ie your code just uses what WebbotLib is expecting ie -127 to +127. WebbotLib then changes this value and passes on what is required to the motor controller you are using to achieve the required result.

This means you can change from one motor controller to another without having to change your code - WebbotLib handles changing the -127 to +127 into whatever is necessary.