A bit cheeky
21 December, 2012 - 11:25
Because it's not directly related to the HAH but I'm trying to write an arduino sketch to keep my boiler running while the box is off.
I'm trying to do the equivalent of:
tonumber(frame:getValue("input.state","text"))
I've trawled many sites so either I'm missing something obvious or it isn't straight forward like it is in most programming languages with which I'm familiar.
Is there an easy way to read a string coming in on the serial port and convert it to a number?
The function that you need is atoi() - example.