Skip to main content

eval() function for Arduino?

I plan to do the following:

void setup(){
  String term = "12 + (2 * 5)";
  int result = eval(term); // eval function (from Python)
  Serial.println(result); // expecting 22
}

However there is no eval function. Are there any alternatives?

loucket
  • 41
  • 1
  • 2