Yes, your right, the code was working, just my buttons.
Code: Select all
B1 press
B1 press
B1 & B2 press 0.2762681630010775
b2 too Slow 0.27698520299964
b2 too Slow 0.4666348079990712
b3 too Slow 0.9335717579997436
b3 too Slow 0.9347009009979956
b3 too Slow 1.0677250059998187
B1 press
B1 press
B1 & B2 press 0.2411515630010399
b2 too Slow 0.36857593199965777
b3 too Slow 0.8380671960003383
b3 too Slow 0.9476403650005523
B1 press
B1 press
B1 & B2 press 0.21538889899966307
b2 too Slow 0.3071169409995491
b3 too Slow 0.7972805680001329
b3 too Slow 0.9032614239986287
B1 press
B1 press
B1 & B2 press 0.22548668699892005
b2 too Slow 0.35307081199789536
b3 too Slow 0.833122669999284
b3 too Slow 0.948025689998758
B1 press
B1 press
B1 & B2 press 0.3233632490009768
b2 too Slow 0.6077957009983948
b3 too Slow 1.0895845960003498
b3 too Slow 1.0906576849993144
b3 too Slow 1.3699572999976226
b2 too Slow 15.226364193000336
b2 too Slow 15.44233420800083
B1 press
B1 press
B1 & B2 press 0.250141464999615
b2 too Slow 0.3734411040022678
b3 too Slow 0.7581466949995956
b3 too Slow 0.876921319002576
Seems I have some bounce issues.
I tried a 0.001 bounce_time, 0.01 and 0.1.
Code: Select all
Python 3.7.3 (/usr/bin/python3)
>>> %Run new_off.py
B1 press
b2 too Slow 2.455782492997969
B1 press
B1 & B2 press 0.4007845180021832
b3 too Slow 9.051954331000161
b2 too Slow 14.353104026002256
b2 too Slow 15.032857780002814
b3 too Slow 15.63174386400351
B1 press
b2 too Slow 3.6551347599997825
b2 too Slow 4.187323952002771
B1 press
B1 & B2 press 1.6357756220022566
b3 too Slow 2.7482044300013513
B1 press
B1 press
B1 & B2 press 0.5204679039998155
B1 & B2 & B3 press 1.6152661950000038
tv off
Got there in the end, but proved to unusable with the bounce_time.
I might just go with a 2 button system, B1 and B3, as I got to the B1 and B2 press quite often.
https://1drv.ms/u/s!AhF9jRtLVrOphrMcppJSBL_AsnEJBw
Link to Onedrive image. To large to attach.
I'll trying to make a really basic video player that is controlled by these 3 big buttons. They have micro-switches inside them which must have a big bounce when hit.
I guess using buttons 1 and 3, the two outside ones will suffice, hard to accidentally hit both of them in under 2 seconds.
Just thought about something else, could 2 buttons pressed at the same time work?