Hello everyone, i try to do if-else statement by using a user input in serial monitor. but everytime i enter a number on serial monitor, the print is not what i code. anyone please help, thank you
char value0;
void setup (){ Serial.begin(9600); delay(200); Serial.println("Enter Number: "); }
void loop(){ if( Serial.available()) { value0 = Serial.read(); if((value0 > '39') && (value0 < '151')) { Serial.println("Play song 1"); } else { Serial.println("Next song"); } }}