Search found 24 matches

by Philosophix
Wed Jan 30, 2019 8:15 am
Forum: MicroPython pyboard
Topic: Debouncing inductive sensor input
Replies: 2
Views: 156

Re: Debouncing inductive sensor input

Thanks, I'll try that. Do you know if the interrupt gets called already when I set

Code: Select all

ExtInt(Pin('X20'), ExtInt.IRQ_RISING, Pin.PULL_UP, axle_pulse_detected)
which will pull up the line causing a rising signal?
by Philosophix
Wed Jan 30, 2019 7:12 am
Forum: MicroPython pyboard
Topic: Debouncing inductive sensor input
Replies: 2
Views: 156

Debouncing inductive sensor input

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...
by Philosophix
Thu Jan 24, 2019 9:22 am
Forum: MicroPython pyboard
Topic: ImportError: no module named 'upower'
Replies: 3
Views: 251

Re: ImportError: no module named 'upower'

Doesn't anyone have a clue?
by Philosophix
Sat Jan 19, 2019 12:50 pm
Forum: MicroPython pyboard
Topic: ImportError: no module named 'upower'
Replies: 3
Views: 251

ImportError: no module named 'upower'

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...
by Philosophix
Thu Jan 10, 2019 7:10 am
Forum: MicroPython pyboard
Topic: Save data on power down
Replies: 14
Views: 674

Re: Save data on power down

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...
by Philosophix
Sat Jan 05, 2019 6:34 am
Forum: MicroPython pyboard
Topic: PYBv1.1 V+ range
Replies: 7
Views: 404

Re: PYBv1.1 V+ range

Thank you for your suggestions! I'll do that.
by Philosophix
Fri Jan 04, 2019 8:59 pm
Forum: MicroPython pyboard
Topic: Speed calculation
Replies: 3
Views: 273

Re: Speed calculation

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!
by Philosophix
Fri Jan 04, 2019 8:22 pm
Forum: MicroPython pyboard
Topic: PYBv1.1 V+ range
Replies: 7
Views: 404

Re: PYBv1.1 V+ range

Do you have any suggestions for the RC as my knowledge of electronics is very rudimentary?
by Philosophix
Fri Jan 04, 2019 8:00 pm
Forum: MicroPython pyboard
Topic: Speed calculation
Replies: 3
Views: 273

Speed calculation

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 ...
by Philosophix
Fri Jan 04, 2019 7:49 pm
Forum: MicroPython pyboard
Topic: PYBv1.1 V+ range
Replies: 7
Views: 404

Re: PYBv1.1 V+ range

Is a 7809 regulator sufficient then?