Arduino Zero Timer / PWM Direct Access Notes

If you want to access the timer or PWM outputs more direct style here are some helpful links: Link to google docs explaining the PWM pins and their associated timers used on V1.0 of our microbot PCB    Arduino forum example library code to set PWM values manually – Includes TC3 code which most examples

Microbot 2016 Software/Firmware Setup

Install Arduino IDE Follow this guide to add the Adafruit board manager to the IDE Install the Adafruit SAMD board profile In the Arduino IDE Tools Menu > Board > Boards Manager > search for SAMD > Install “Adafruit SAMD Boards” Download our custom Radiohead library from Waiakea Robotics Github Click the green “Clone or Download”

Microbot Motor Control

#define MOTOR_R_DIR 5 // Right motor direction pin #define MOTOR_R_SPD 9 // Right motor speed pin – apply PWM signal (analog out) to this pin #define MOTOR_L_DIR 6 #define MOTOR_L_SPD 10 #define FWD 0 // 0 = forward in our robot wiring #define BWD 1 // 1 = backward in our robot wiring In the

Microbots How to make a Function

Why do we have functions? A function is a way for programmers to reuse code without having to retype the code. This is a big time saver, and it makes code more readable, that is if the function names are well selected. For my example I will use returntype = void This returntype specifies that the block of code will not return any value. Calling such a

%d bloggers like this: