- Apply voltage to board. We uploaded Test code inside.
- Dipswitch 1 opens motors, back & forward. Dipswitch 2 opens User Led Toggle and Dipswtich 3 and button changes which led blinking.
- Download the Xmotion library from jsumo.com/xmotion
- #include <xmotion.h>
- Start from basic example codes, and turn page for description of each element
Xmotion Functions Cheat Sheet
- xmotion.UserLed1(time_ms); // Blinks User Led 1 in time_ms interval.
- xmotion.UserLed2(time_ms); // Blinks User Led 2 in time_ms interval.
- xmotion.ToggleLeds(time_ms); // Toggles both user Leds in time_ms interval.
- xmotion.CounterLeds(time_ms, int Multiplier); // Toggles both user leds in time ms interval for multiplier time.
- xmotion.Trimpot(); // Gives analog value data (0 to 1023) of trimpot.
- xmotion.VoltageIn(); // Gives voltage real value data in float.
- xmotion.LipoCutOff(int Cell); // Makes cut off function for cell count lipo.
- xmotion.Forward(%Percent,Time_ms); // Makes both motor forward in % percent with time_ms declared.
- xmotion.StopMotors(Time_ms); // // Makes both motor stop until time_ms declared.
- xmotion.Backward(%Percent,Time_ms); // Makes both motor backward in % percent with time_ms declared.
- xmotion.Right0(%Percent,Time_ms); // Makes left motor forward and right motor backward in % percent with time_ms declared.
- xmotion.Left0(%Percent,Time_ms); // Makes right motor forward and left motor backward in % percent with time_ms declared.
- xmotion.ArcTurn(%LeftPercent,%RightPercent,Time_ms); // Makes both motor variable speeds in % speed with declared time value.
- xmotion.MotorControl(LeftValue,RightValue); // Raw motor speeds from left motor to right motor between -255 to 255. Minus (-) values means backward.
Pin Table
Arduino Pin | Feature | Arduino Pin | Feature |
D0 | Free | D11 | Right Motor PWM (Speed) |
D1 | Free | D12 | Left Motor Direction |
D2 | Free | D13 | Right Motor Direction |
D3 | Left Motor PWM (Speed) | A0 | Voltage Sensor |
D4 | Free | A1 | Free |
D5 | Dipswitch 1 Input | A2 | Free |
D6 | Dipswitch 2 Input | A3 | Trimpot |
D7 | Dipswitch 3 Input | A4 | Free |
D8 | User Led 1 Output | A5 | Free |
D9 | User Led 2 Output | Extra D15 | Free, RX written, MOSI |
D10 | Button & Start Pin Input | Extra D16 | Free, TX written, SCK |