Pinoccio / library-pinoccio

Arduino library for Pinoccio
Other
28 stars 24 forks source link

Digital pin events are not always received by the Lead Scout #152

Open jingman opened 10 years ago

jingman commented 10 years ago

I'm pressing a button on a Field Scout, and sometimes, the state change is missed.

Using verbose(1) on the Field Scout, I'm able to verify that the event handler is being called successfully on every pin change, and that it's announcing the correct pin states to the mesh.

Using verbose(1) on the Lead Scout, I'm able to verify that the multicast message is not received. It seems to happen intermittently, maybe 1 in 10 state changes.

jingman commented 10 years ago

More notes about my setup and testing:

soldair commented 10 years ago

is the scout on master?

jingman commented 10 years ago

No, both Scouts are on 2014060501-0-g3b28e32.

quartzjer commented 10 years ago

This is unfortunately /probably/ just the lossy lwm broadcast, but you can verify using this simple group ping scoutscript on one scout:

// these are for the first scout

// print the pong
function on.message.group {if(arg(1) == 5) { key.print(arg(3)); led.blue(10); } };

// send the ping
p = 0;
function ping { p++; message.group(4, key(p)); key.free(key(p)); led.red(10); };
run ping,1000; 

Then on one or more other scouts:

// this is for any other scout in the troop to send the pong back
function on.message.group {if(arg(1) == 4) { led.green(10); message.group(5,arg(3)) } };