I have an inductive sensor on X20 setup with an interrupt like so: import stm def axle_pulse_detected(line): stm.mem32[stm.RTC+stm.RTC_BKP9R] += 1 ExtInt(Pin('X20'), ExtInt.IRQ_RISING, Pin.PULL_UP, axle_pulse_detected) What would be a good way do debounce the input, as I now get sporadic extra pulse...
I'm trying to use the BkpRAM from the upower module (https://github.com/peterhinch/micropython-micropower/blob/master/UPOWER.md) but I'm getting the following error: Traceback (most recent call last): File "main.py", line 6, in <module> ImportError: no module named 'upower' MicroPython v1.9.1 on 201...
Saving a number to stm.mem32[stm.RTC+stm.RTC_BKP9R] on power down is working fine, but I need to save another number too which can fit in 16 bits. Is there room for another number and if so, what is the address? The Wiki: http://wiki.micropython.org/platforms/b ... ard/modstm won't let me access htt...
So I schedule a callback-function in the timer callback-function?
What do I do with the arg-argument of the schedule-function if I'm scheduling a function with no args?
Thanx!
I was thinking of calculating vehicle speed in a timer callback-function set to be called at 1 hz, but am unsure what I'm allowed to do inside the callback. Can I declare and use local variables, call other functions, ...? Or is there a better way to implement speed calculation when I know how many ...