mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
14 lines
No EOL
306 B
C++
14 lines
No EOL
306 B
C++
void setup() {
|
|
// put your setup code here, to run once:
|
|
pinMode(LED_BUILTIN, OUTPUT);
|
|
Serial.begin(9600);
|
|
}
|
|
|
|
void loop() {
|
|
// put your main code here, to run repeatedly:
|
|
while (Serial.available()) {
|
|
int byte = Serial.read();
|
|
digitalWrite(LED_BUILTIN, byte);
|
|
Serial.print(byte);
|
|
}
|
|
} |