Answers for "arduino string to int"

1

arduino string to int

void loop() {
  Serial.readBytes(mystr,5); //Read the serial data and store in var

  //delay(1000);
  
  String val = mystr; 
  int i = val.toInt();
  int num = i + i;
  Serial.println(num);
  
}
Posted by: Guest on December-16-2020
0

arduino char to int

value = atoi(inChar);
value = int(inChar);
value = (int)inChar;
Posted by: Guest on June-09-2020

Browse Popular Code Answers by Language