need to detect button hold via VirtualWire


i have made remote control scoreboard, based on previous ones, due oversight, , burning midnight oil, forgot fit normal  standby button ( switch off displays when not in use )

i supposed unit out today, , don't have time add pushbutton , reprint decal ( needs strip down of 16 bcd switches )


@ crossroads , finally  have made sort of ftdi cable $4 usb adaptor, plugged in @ receiver on left, can see socket dangling remote - godsend , wish had mentioned before :-)

right, have been trying do, have receiver/display unit go standby if update button held on second.
the remote repeatedly transmits, on receive side, there gap between each  receive.

if (vw_get_message(buf, &buflen)) // non-blocking

i know there must way set timer on first receive, , somehow make "standby" go high if there not second between them, cant see ( 16 hours sleep since last weekend ! )

any suggestions ?

here's code debris commented out have tried :-

note time (millis) message came in, call newtime.
compare time on prior message; oldtime.
code: [select]

if ((newtime - oldtime) >=1000){
oldtime = newtime; // set next pass thru loop
// set standby flag
}


Arduino Forum > Using Arduino > Project Guidance > need to detect button hold via VirtualWire


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support