Interfacing problem
Karthikeyan from India  [2 posts]
12 year
Hi guys i am very new to this.I have created a robot using atmega and i ve programmed it using avr studio it is contolled by the keyboard (direction buttons) through serial communication.I want to know how can i interface it with avm navigator such that i can use the option of navigation by map mode which is a part of my project.Please help me with it .
Anonymous 12 year
You should be able to interpret the  NV_L_MOTOR and NV_R_MOTOR variables that avm creates in order to steer your robot. Since the avm uses keystokes to in part understand how the bot is moving when being trained you can hook up your own variables to respond to those.

For example, if you simply check if those variables are zero, negative or positive you can then treat them as individual keystokes. This can be done in vbscript or by just using an if statement module. I.e.

left = GetVariable("NV_L_MOTOR")
right = GetVariable("NV_R_MOTOR")

if left > 0 and right > 0 then
  SetVariable "key_pressed", "forward"

elseif left < 0 and right < 0 then
  SetVariable "key_pressed", "backward"

elseif left > 0 and right < 0 then
  SetVariable "key_pressed", "turn_right"

elseif left < 0 and right > 0 then
  SetVariable "key_pressed", "turn_left"
  SetVariable "key_pressed", ""
end if

or something like that.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index