Skip to content

Instantly share code, notes, and snippets.

@devSarry
Created October 23, 2017 11:42
Show Gist options
  • Save devSarry/1fda008dcf180462d26be207385ad52b to your computer and use it in GitHub Desktop.
Save devSarry/1fda008dcf180462d26be207385ad52b to your computer and use it in GitHub Desktop.

Communications

Introduction

For this project we will be doing all the communications over serial between the Arduino and the C# program.

We will be confroming to the "AT Commands" or Hayes

In short all serial commands sent to Arduino will be prefeced with

AT+

and serial commands sent from the Arduino to the computer will be prefeced with

+

Temperature API

To Arduino

From Arduino

+TEMP:"value" Requires a value and the value to be a float. The Arduino will be sending temperature reading every 10s

Clapping Hands API

To Arduino

From Arduino

+CLAP

Takes no values This command will stop all music from playing

Whistle API

To Arduino

From Arduino

+WHISTLE

Takes no values This command will stop the numbers from being displayed

Button API

To Arduino

From Arduino

+NUM_BUTTON

Takes no values This command will start the numbers sequence

+MUSIC_BUTTON

Takes no values Starts playing music

+START_SNAKE

Takes no values Triggered when any buttons have been pressed 3 times within 25 seconds. Starts snake.

RGB API

To Arduino

AT+RGB="r,g,b"

Takes 3 int values 255 AT+RGB="255,0,0"

From Arduino

Snake API

To Arduino

AT+SNEAK_DEAD

Takes no values Triggers RGB lights to flash random colors and buzzer to go off.

From Arduino

+SNEAK_RESET

Takes no values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment