MEAM.Design - SAAST - MX Reference Guide


Hardware

The mX...
headers
connections
battery usage, charging, safety
which USB port does what
module connectors




Programming

When you've plugged the m2 microcontroller into the mX expansion board, you should include "mX.h" which will provide access to all of the m2 functions as well as all of the following which are specific to the expansion board:


Useful Constants:

  CW 0
CCW 1
A ... K mX-specific ports


Initialization:

  mx_init( ) set up the m2 to work with the mX board (should always be called first)


RC Servo Control Outputs

  mx_servo_init(channel) enable an RC servo output channel ((G, H, I, or J)
mx_servo(channel, percent) set an RC servo output channel ((G, H, I, or J) to a percentage between 0.0 and 100.0*


DC Motor Outputs / Encoder Inputs

  mx_motor(channel, dir, percent) set a DC motor output channel (1 or 2) to a direction (CW or CCW) and a percentage between 0.0 and 100.0
mx_encoder_zero(channel) reset the encoder counter for the specified channel (1 or 2)
result = mx_encoder(channel) read the specified encoder channel (1 or 2)



* You must talk to Jonathan to figure out what this asterisk means