Skip to content
Connor Murphy edited this page Mar 5, 2015 · 2 revisions

Sensors

Since the Udoo's iMX6 is incapable of analog to digital conversion we will be using the Arduino side's SAM3X to read the analog values of the sensors.

Notice about Requests

Due to serial restrictions all messages sent to the SAM3X must be terminated a $
This is because the serial listener on the SAM3X must wait until the this character is received due to the message being broken in half (or more) on its way over.

Requests

  • ReadDistSensor Sensor - Reads an individual distance sensor specified by direction and position of the sensor (F, LF, LB, etc) as described here.
  • FindRHOpening - SAM3X will read in all of the distance sensors and find the next available opening according to the right-hand rule.
  • NotifyOfAngle Angle - SAM3X will use the line sensors to count the number of 90 degree turns the robot completes specified by the argument. The argument is an integer degrees. The integer will be negative if the robot is turning right and positive if the robot is turning left.

Responses

  • AngleReached - Notifies the iMX6 that the robot is finished turning and the motors should turn off.
  • Opening Direction - Informs the iMX6 of where the next opening is.
  • DistSensor Sensor:Value - Responds with the value of a particular distance sensor.
  • LineDetected - SAM3X sends this message when it senses a line beneath the robot.
Clone this wiki locally