How does watch work ? #1433
Replies: 11 comments
-
Posted at 2020-08-07 by @gfwilliams Can you just try a single What you're doing with the two calls is setting up two debounce instances, one for rising and one for falling. While you'd expect them to work the same way, it's possible that there's some problem there. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-07 by JumJum Using edge:0 was my first step. Thats were the problem started.
Problem stays.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-07 by @MaBecker What about using a different pin to verify. connect D3 with D4 and send some pulse:
Output should look like this:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-07 by @gfwilliams Just checking, what device is this on? MDBT42? I can reproduce it here too - a simple Without debounce you'd expect that you would get multiple events though, just because sometimes the noise is so fast that my the time the IRQ handler fires the pin has already changed state. But that obviously shouldn't cause issues with the debounce. You should be able to work around it pretty easily if you need to just be doing some debouncing yourself though - because I imagine you're only really interested in the falling edge. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-07 by @gfwilliams Ok, I basically have a fix for this, but it's not tested properly yet and I'll be on holiday next week so I'm not going to push this to master :) I've just pushed a branch called |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-14 by JumJum Simple testing looks good. Testing with very old rotary gives problems. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-14 by @allObjects you may need to take into account the timings of the dialing life cycle. From your first line of the first post I assume that you have an 'old' rotary phone and you want to detect which digits and number it dialed (to drive a touch tone sequence?). Remembering how rotary phones worked: when letting the disk go, the loaded spring pulls/rotates the disk it back in rest position with a constant angle speed. Angle speed is controlled - kept 'constant' / preventing from accelerating and running away - by a governor, either centrifugal friction or air resistance governor like they were used in old steam machines and still are used in spring driven music boxes. A combination of a single shot watch and timeouts as as key controls of a timing state machine may make it work:
This is just the core... some startup and end processing (clear watch and handles). There is most likely another switch that will tell when a dial is about to happen. A watch on that could be used to start the state machine. Robust debouncing is a tough thing to do... Versuchst du sowas anzuschliessen? Gelb-Gruen: Puls, Weiss-Braun: Ruheposition (?)Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-17 by @gfwilliams Thanks for checking! I'd be interested to hear from anyone else willing to try the setWatch branch: https://www.espruino.com/binaries/travis/setWatch_fix_1902/ Always handy to have another set of eyes to see if setWatch got broken somehow before I merge these changes ;) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-19 by JumJum @allObjects, |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-19 by @allObjects thank for the pictures... smart simple very space resourceful solution for the governor that controls the speed of the dial: reverse worm gear instead of small and large cog wheel. Do you notice irregularity in the rotation of the cam? Did you think of cleaning the contacts? And check the wire and (clean) other contacts in the circuit? I assume you already wend down that lane... Worst cace, get a micro switch or optical gate and catch the signal totally independent of the phone wiring. 'Related' question: what do you do for hand set (microphone and ear piece)? Looking forward to your solution. I have some phone hardware laying around for a while now. When the project was hot and I had ordered as A6C Quad Band on a breakout board, I got instead sent just the module... and by the time the other options arrived, the need was not pressing anymore, so the stuff still 'waits' for some time to squash - squander? - The A6C then arrived w/ a camera w/ flash, and the SIM800L is with PCB antenna.Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-19 by JumJum @allObjects, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-08-07 by JumJum
Still working on my rotary phone.
For recognizing a simple test should help, thats the idea.
Next switched to terminal window and checked several times.
How can I get raising edge several times, without having falling edge between ?
Checked the same with one watch (edge:0) and got similiar result.
Beta Was this translation helpful? Give feedback.
All reactions