Electricity meter using function
i use code
https://github.com/daveberkeley/elster_meter/blob/master/elec_meter.ino
of project:
http://www.rotwang.co.uk/projects/meter.html
and change adding
and changing loop code below:
so when write print on serial show measurement. not work. can me?
https://github.com/daveberkeley/elster_meter/blob/master/elec_meter.ino
of project:
http://www.rotwang.co.uk/projects/meter.html
and change adding
code: [select]
string incomingbyte; // incoming serial data
and changing loop code below:
code: [select]
void loop()
{
incomingbyte = serial.readstring();
if (incomingbyte == "print")
{
int byte_data = decode_bit_stream();
if (byte_data == -1)
return;
meter.on_data(byte_data);
}
}
so when write print on serial show measurement. not work. can me?
why did give string name "incomingbyte"?
Arduino Forum > Using Arduino > Programming Questions > Electricity meter using function
arduino
Comments
Post a Comment