Download Print this page

NEX ROBOTICS SPARK V ATMEGA16 Hardware Manual page 97

Robotic research platform

Advertisement

54
59
Example: To set left motor velocity to 0x84, right motor velocity to 0x65, and move
backward.
Step1: 0x14
Load the lower nibble '4' of the left motor speed into the robot
Step2:
Delay of at least 3 milliseconds
Step3: 0x28
Load the upper nibble '8' of the left motor speed into the robot and execute the
command
Step4:
Delay of at least 3 milliseconds
Step5: 0x35
Load the lower nibble '5' of the right motor speed into the robot
Step6:
Delay of at least 3 milliseconds
Step7: 0x46
Load the upper nibble '6' of the right motor speed into the robot and execute the
command
Step8:
Delay of at least 3 milliseconds
Step9: 0x52
move backward
Step10: Delay of at least 3 milliseconds before loading next command
7.3.3 Commands to access the Analog sensor data:
Command
(HEX)
60
64
65
66
C1
C2
© NEX Robotics Pvt. Ltd. and ERTS Lab IIT Bombay, INDIA
LEFT(Left wheel
backward, Right
wheel forward,)
HARD STOP
Table 7.2
Data
Battery voltage
Robot sends back 8 bit battery voltage value. To convert this
value in to volts use the following conversion formula:
Battery Voltage = ADC data x 0.069
White line sensor 1 (Left)
The Robot will return an 8 bit analog value of the left white
line sensor
White line sensor 2 (Centre)
The Robot will return an 8 bit analog value of the center
white line sensor
White line sensor 3 (Right)
The Robot will return an 8 bit analog value of the right white
line sensor
IR Proximity sensor (Left)
The Robot will return an 8 bit analog value of the IR
Proximity sensor 1
IR Proximity sensor 2 (Centre)
The Robot will return an 8 bit analog value of the IR
Proximity sensor 2
SPARK V ATMEGA16 Hardware Manual
1
0
0
0
1
0
0
0
97

Advertisement

loading
Need help?

Need help?

Do you have a question about the SPARK V ATMEGA16 and is the answer not in the manual?