Arduino call/response program
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
/* This sketch waits for incoming serial data to be present | |
and then sends a message serially. | |
After Serial.println() is a call to Serial.read() to remove | |
the received byte from the input queue. If you send more than | |
one byte to the Arduino, you'll get more than one response sent | |
back at you. | |
*/ | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
if (Serial.available() > 0) | |
{ | |
Serial.println("Hello"); | |
Serial.read(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Anonymous
i want to read the values from a temperature sensor using arduino in my c code can you help me with this