This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte lineEnding = 0x0A; | |
//Data array that the received info from android app is recorded. Every byte corresponds to a digital pin. | |
byte readBuffer[15]; //For example readBuffer[5] is for digital pin 5. | |
byte defaultByte = 0x10; //On start all arduino digital pins must be input for electrical protection. | |
//Pins 0 and 1 are used for serial comminations. So read | |
void setup() { | |
for (int i=0; i < sizeof(readBuffer)-1 ; ++i) { |