17 lines
266 B
Arduino
17 lines
266 B
Arduino
|
int inQuery;
|
||
|
|
||
|
void setup() {
|
||
|
Serial.begin(9600);
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
|
||
|
if ( Serial.available() > 0) {
|
||
|
inQuery = Serial.read();
|
||
|
Serial.print("Decimal: ");
|
||
|
Serial.println(inQuery);
|
||
|
Serial.print("Hexadecimal: ");
|
||
|
Serial.println(inQuery, HEX);
|
||
|
}
|
||
|
}
|