Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define LED1 13
- #define LED2 3
- void setup()
- {
- pinMode(LED1, OUTPUT);
- pinMode(LED2, OUTPUT );
- Serial.begin( 115200 );
- }
- char command[100];
- byte commandLength = 0;
- void loop()
- {
- if ( Serial.available() ) {
- command[commandLength] = ( char )Serial.read();
- if ( command[commandLength] == '\n' ) {
- command[commandLength] = 0;
- }
- commandLength++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement