Skip to content

Instantly share code, notes, and snippets.

@shahrulnizam
Last active December 17, 2015 01:39
Show Gist options
  • Save shahrulnizam/5530073 to your computer and use it in GitHub Desktop.
Save shahrulnizam/5530073 to your computer and use it in GitHub Desktop.
ChipKIT Lesson: Serial Communication
/*
Project: Serial Communication Lesson
Programmer: Shahrulnizam Mat Rejab
Board: Chipkit UNO32/MAX32
Last Modified: 16 January 2014
Website: http://shahrulnizam.com
*/
int data;
void setup()
{
Serial.begin(9600);
Serial.println("Serial Ready!");
}
void loop()
{
if(Serial.available()>0)
{
Serial.print("You type: ");
while(Serial.available()>0)
{
data=Serial.read();
Serial.write(data);
}
Serial.println();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment