I have been learning to send values to the arduino through the serial monitor. the code is below
int i = 0;
void setup()
{
Serial.begin(9600);
}
void loop() {
if (Serial.available())
{
i = Serial.read();
Serial.print( i);
}
}
when i send 1 to the monitor it prints 49 which is the ascii value of 1. but i want to only print 1. not its ascii value. what should be done?