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

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

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts