Comments (4)
Just wanted to say thanks again. Your concurrent example really helped me and I got my code working right away. Application is for a lap timer for a custom slot car track I built. I really appreciate your help and your libraries.
from md_uiswitch.
With no code it is hard to say what you are doing wrong.
- Make sure the switches are separate objects as you need the detection to work concurrently.
- The status is only sent once when the status is detected. It is unlikely that the detection will be at the same time for multiple switches, so a simple if (switch1==keydown and switch2 == keydown) is highly unlikely to work. You should store the last non-null status of each switch and compare the two stored statuses. Issues then arise of how close they need to be for it to register as 'simultaneous' and that needs to be handled by a timer in the application.
from md_uiswitch.
Hi. I think you nailed it with point 2. That is what I figured was happening. Thanks so much for the help and the great libraries.
from md_uiswitch.
FWIW I added a new 'Concurrent' example in the latest version (v2.2.1) to test that my idea was correct.
from md_uiswitch.
Related Issues (12)
- multiple push button HOT 1
- Issue in 2.0.0 with multiple MD_UISwitch_Digital instances HOT 2
- Tolerance to "too long" long press HOT 3
- Unable to get a long press response from MD_UISwitch_Digital HOT 1
- Thinking about also using PCF8574 HOT 4
- False positive for KEY_SINGLE HOT 3
- Debouncing Algorithm sensitive to short presses HOT 1
- Example MD_UISwitch compilation error HOT 2
- Navigation problem with ADKeyboard Module v2 DFRobot HOT 1
- HowTo detect 2 keys pressed simultaneously with MD_UISwitch_Digital() HOT 4
- Version 2.0 is not backward compatible with 1.2.x HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from md_uiswitch.