ApelPro

sorosport_olvasás_lezárókarakterrel

Apr 11th, 2021
503
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define LED1 13
  2. #define LED2 3
  3.  
  4. void setup()
  5. {
  6.   pinMode(LED1, OUTPUT);
  7.   pinMode(LED2, OUTPUT );
  8.  
  9.   Serial.begin( 115200 );  
  10. }
  11.  
  12.  
  13. char command[100];
  14. byte commandLength = 0;
  15.  
  16. void loop()
  17. {
  18.   if ( Serial.available() ) {
  19.     command[commandLength] = ( char )Serial.read();
  20.     if ( command[commandLength] == '\n' ) {
  21.      command[commandLength] = 0;
  22.     }
  23.     commandLength++;
  24.   }
  25. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×