Sure - we could just copy it from openmvcam
openmvcam uses micropython as a sub-module, so openmv could use the one from micropython (if they want).
I'll do a PR to add it to mp
Search found 3821 matches
- Wed Oct 22, 2014 2:20 am
- Forum: Programs, Libraries and Tools
- Topic: Python DFU util
- Replies: 17
- Views: 23821
- Tue Oct 21, 2014 9:13 pm
- Forum: General Discussion and Questions
- Topic: Playing with Interrupts
- Replies: 21
- Views: 26685
Re: Playing with Interrupts
Since you need to use I2C to talk to the touch sensor, I would be inclined to use the pseudo multi-tasking stuff that uses the generators. See: http://forum.micropython.org/viewtopic.php?f=2&t=15&p=101&hilit=tasking#p208 and see this thread as well: http://forum.micropython.org/viewtopic.php?f=2&t=2...
- Tue Oct 21, 2014 9:04 pm
- Forum: MicroPython pyboard
- Topic: Timers (Solved)
- Replies: 10
- Views: 11265
Re: Timers
Sure - that works. You're going to get pulses at half the frequency of the timer (since it takes 2 timer ticks to make a pulse).
- Tue Oct 21, 2014 8:57 pm
- Forum: General Discussion and Questions
- Topic: Playing with Interrupts
- Replies: 21
- Views: 26685
Re: Playing with Interrupts
That error message: uncaught exception in Timer(8) interrupt handler Traceback (most recent call last): File "lcd_skin.py", line 20, in lcd_skin_keys File "mpr121.py", line 44, in touch_status MemoryError: memory allocation failed, heap is locked tells me that you're trying to allocate memory from w...
- Tue Oct 21, 2014 6:49 pm
- Forum: Hardware Projects
- Topic: Module for MPU9150
- Replies: 54
- Views: 53995
Re: Module for MPU9150
ok - so you want to be able to distinguish between MPU9150_Exception and Exception? I'm still new to some of the python subtleties...
- Tue Oct 21, 2014 2:24 pm
- Forum: Hardware Projects
- Topic: Module for MPU9150
- Replies: 54
- Views: 53995
Re: Module for MPU9150
Without looking at the details, why couldn't you just use:
It's not clear to me why using a more derived Exception class buys you anything?
Code: Select all
try:
..somethng...
except Exception:
..deal with excepttion...
- Mon Oct 20, 2014 11:14 pm
- Forum: MicroPython pyboard
- Topic: Timers (Solved)
- Replies: 10
- Views: 11265
Re: Timers
There are a variety of ways to do it, depending on what you want to do. I don't recommend just using pyb.udelay - you'll wind up with jitter and that can cause you to lose steps. One method is to run a timer at a fixed frequency, and use Output Compare to generate interrupts (I haven't done this mys...
- Mon Oct 20, 2014 9:20 pm
- Forum: Programs, Libraries and Tools
- Topic: pybkick - tools to make deploying code to pyboard easier
- Replies: 24
- Views: 26107
Re: pybkick - tools to make deploying code to pyboard easier
I seem to recall seeing something like that if I try and execute a pyb.bootloader() command. Basically, I think what's happening is that the serial port gets closed and pyboard.py isn't dealing with that properly. You should wrap the read in a try/except block, like https://github.com/dhylands/usb-s...
- Mon Oct 20, 2014 9:13 pm
- Forum: MicroPython pyboard
- Topic: Timers (Solved)
- Replies: 10
- Views: 11265
Re: Timers
ok - yeah those types of servos are different than the RC servos I was referring to. Steppers/servo controllers (like the one you referred to) use a direction and pulse. According to the documentation you provided, the pulse width needs to be at least 1.5 usec. The frequency of the pulses is what de...
- Mon Oct 20, 2014 6:30 pm
- Forum: MicroPython pyboard
- Topic: Adding a BOOT0 switch
- Replies: 4
- Views: 6464
Re: Adding a BOOT0 switch
The BOOT0 switch only needs to be held while the board resets. You can release it a split second after releasing the reset button. The red/yellow/blue LEDs turn on dimly, which is your indication that you're in DFU mode. Incidently, with the new firmware, you can use: pyb.bootloader() to enter into ...