|
wpi-32u4-library
|
#include <Arduino.h>#include <wpi-32u4-lib.h>#include <IRdecoder.h>#include <ir_codes.h>#include <Chassis.h>#include <Servo32u4.h>Go to the source code of this file.
Enumerations | |
| enum | ROBOT_STATE { ROBOT_IDLE , ROBOT_SERVO_TEST } |
Functions | |
| void | idle (void) |
| void | adjustServos (uint16_t uSeconds) |
| void | handleKeyPress (int16_t keyPress) |
| void | setup () |
| void | loop () |
Variables | |
| Chassis | chassis (7.0, 1440, 14.9) |
| Servo32U4Pin5 | servoA |
| Servo32U4Pin6 | servoB |
| const uint8_t | IR_DETECTOR_PIN = 1 |
| IRDecoder | decoder (IR_DETECTOR_PIN) |
| ROBOT_STATE | robotState = ROBOT_IDLE |
| enum ROBOT_STATE |
| void adjustServos | ( | uint16_t | uSeconds | ) |
Definition at line 50 of file main.cpp.
References ROBOT_SERVO_TEST, robotState, servoA, servoB, Servo32U4Pin5::writeMicroseconds(), and Servo32U4Pin6::writeMicroseconds().
Referenced by handleKeyPress().
| void handleKeyPress | ( | int16_t | keyPress | ) |
Definition at line 60 of file main.cpp.
References adjustServos(), Servo32U4Pin5::attach(), Servo32U4Pin6::attach(), ENTER_SAVE, idle(), PLAY_PAUSE, ROBOT_IDLE, ROBOT_SERVO_TEST, robotState, servoA, servoB, VOLminus, and VOLplus.
Referenced by loop().
| void idle | ( | void | ) |
Definition at line 35 of file main.cpp.
References chassis, Servo32U4Pin5::detach(), Servo32U4Pin6::detach(), Chassis::idle(), ROBOT_IDLE, robotState, servoA, and servoB.
Referenced by handleKeyPress(), and setup().
| void loop | ( | ) |
Definition at line 127 of file main.cpp.
References decoder, IRDecoder::getKeyCode(), handleKeyPress(), and robotState.
| void setup | ( | ) |
Definition at line 100 of file main.cpp.
References Servo32U4Pin5::attach(), Servo32U4Pin6::attach(), chassis, decoder, idle(), Chassis::init(), IRDecoder::init(), servoA, servoB, and Chassis::setMotorPIDcoeffs().
| Chassis chassis(7.0, 1440, 14.9) | ( | 7. | 0, |
| 1440 | , | ||
| 14. | 9 | ||
| ) |
| IRDecoder decoder(IR_DETECTOR_PIN) | ( | IR_DETECTOR_PIN | ) |
| ROBOT_STATE robotState = ROBOT_IDLE |
Definition at line 32 of file main.cpp.
Referenced by adjustServos(), handleKeyPress(), idle(), and loop().
| Servo32U4Pin5 servoA |
Definition at line 23 of file main.cpp.
Referenced by adjustServos(), handleKeyPress(), idle(), and setup().
| Servo32U4Pin6 servoB |
Definition at line 24 of file main.cpp.
Referenced by adjustServos(), handleKeyPress(), idle(), and setup().