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

Help with codes to add 1 more shift register and add more to matrix LED

tcp client

Can't read sms using Thinker A7 communicate with Arduino