commands.h 710 B

12345678910111213141516171819202122232425262728293031323334
  1. /* Define single-letter commands that will be sent by the PC over the
  2. serial link.
  3. */
  4. #ifndef COMMANDS_H
  5. #define COMMANDS_H
  6. #define ANALOG_READ 'a'
  7. #define GET_BAUDRATE 'b'
  8. #define PIN_MODE 'c'
  9. #define DIGITAL_READ 'd'
  10. #define READ_ENCODERS 'e'
  11. #define MOTOR_SPEEDS 'm'
  12. #define RESET_ENCODERS 'r'
  13. #define SERVO_WRITE 's'
  14. #define SERVO_READ 't'
  15. #define UPDATE_PID 'u'
  16. #define DIGITAL_WRITE 'w'
  17. #define ANALOG_WRITE 'x'
  18. #define READ_PIDIN 'i'
  19. #define READ_PIDOUT 'o'
  20. #define SOUND_BEEP 'f'
  21. #define LED_CONTROL 'l'
  22. #define A_WHEEL 1
  23. #define B_WHEEL 2
  24. #define C_WHEEL 3
  25. #define FORWARDS true
  26. #define BACKWARDS false
  27. #endif