// Simulate(Uno) link sketch to Arduino board here
int ch;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop()
{
// put your main code here, to run repeatedly:
while (Serial.available() > ch)
{
ch = Serial.read(); //writes the value in serial monitor to ch
if (ch)
{
Serial.write(ch); //prints the ASCII value
Serial.print(" ");
Serial.print(ch, BIN); //prints the BINARY value
Serial.print(" ");
Serial.print(ch, HEX); //prints the HEX value
Serial.print(" ");
Serial.println(ch); //prints the DECIMAL value
}
}
}