Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup()
- {
- Serial.begin(9600);
- }
- void loop()
- {
- char message[16];
- byte count = 0;
- while (Serial.available() < 2)
- {
- }
- char ch = Serial.read();
- while(ch != '!')
- {
- message[count] = ch;
- ch = (char)Serial.read();
- count++;
- }
- message[count] = '\0';
- Serial.println(message);
- }
Add Comment
Please, Sign In to add comment