Skip to content

Instantly share code, notes, and snippets.

@araffin
Last active April 2, 2018 19:22
Show Gist options
  • Save araffin/2f0c89fd789264679504d7416b59e428 to your computer and use it in GitHub Desktop.
Save araffin/2f0c89fd789264679504d7416b59e428 to your computer and use it in GitHub Desktop.
Order Enum
// From https://github.com/sergionr2/RacingRobot
// replicated in https://github.com/araffin/cpp-arduino-serial
#ifndef ORDER_H
#define ORDER_H
// Define the orders that can be sent and received
enum Order {
HELLO = 0, // Hello order to initiate communication with the Arduino
SERVO = 1, // Command the Servomotor (control the direction of the car)
MOTOR = 2, // Command the Motor (control the speed of the car)
ALREADY_CONNECTED = 3, // Already connected to the Arduino
ERROR = 4,
RECEIVED = 5, // Aknowlegment message
STOP = 6, // Emergency stop
};
typedef enum Order Order;
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment