Search found 3229 matches

by dhylands
Thu Oct 17, 2019 11:41 pm
Forum: General Discussion and Questions
Topic: Modules with the leading "u" and without.
Replies: 7
Views: 179

Re: Modules with the leading "u" and without.

The u modules are "micro" versions of the non-u modules. On the embedded platforms, the non-u modules are "weak links" to the u-modules, so by default they map to the same thing. Your code should be ale to just use import os and you'll get uos if it exists. The reason that the u-modules were given a...
by dhylands
Fri Oct 11, 2019 9:17 pm
Forum: Other Boards
Topic: micropython on PPC target
Replies: 4
Views: 212

Re: micropython on PPC target

by dhylands
Fri Oct 11, 2019 5:48 am
Forum: General Discussion and Questions
Topic: Reading PWM signal
Replies: 5
Views: 152

Re: Reading PWM signal

You can also use the IC (input capture) mode of the hardware timers to do this. Here's an example that generates servo style pulses and measures them:
https://github.com/dhylands/upy-example ... ic_test.py
by dhylands
Wed Oct 09, 2019 6:13 pm
Forum: General Discussion and Questions
Topic: large file support for 32-bit Embedded Linux - seek fails after 2GB
Replies: 4
Views: 91

Re: large file support for 32-bit Embedded Linux - seek fails after 2GB

Unfortunately, it isn't that simple. This is the call to lseek: https://github.com/micropython/micropython/blob/2863dcdf4f9f1fc421c7b745195259fbf46250a2/ports/unix/file.c#L107 which uses the mp_stream_seek_t structure. So you need to track down all of the users of that struct and then see what impac...
by dhylands
Wed Oct 09, 2019 4:30 pm
Forum: General Discussion and Questions
Topic: large file support for 32-bit Embedded Linux - seek fails after 2GB
Replies: 4
Views: 91

Re: large file support for 32-bit Embedded Linux - seek fails after 2GB

lseek on 32-bit linux uses type off_t which winds up being long, which is 32-bits on a 32-bit arch.

Under 32-bit linux, you would use lseek64 to seek (absolutely) past the 2Gb mark. off64_t is a long long, which would be 64-bits on a 32-bit arch.
by dhylands
Tue Oct 08, 2019 10:55 pm
Forum: General Discussion and Questions
Topic: for loop won't work with list of class objects
Replies: 2
Views: 65

Re: for loop won't work with list of class objects

You're not calling the same method in the for loop as you are when you do it manually. You're calling flashled in the for loop and flashLed when doing it manually (note the capital L in flashLed).
by dhylands
Sat Oct 05, 2019 10:55 pm
Forum: micro:bit boards
Topic: I2C , Robit Elecfreaks
Replies: 13
Views: 300

Re: I2C , Robit Elecfreaks

Looking at the code, there appears to be 2 PWM lines going to the H-Bridge (rather than a simple direction/PWM) and you control the direction by sending PWM to one line or the other to control the direction.
by dhylands
Fri Oct 04, 2019 4:12 pm
Forum: micro:bit boards
Topic: I2C , Robit Elecfreaks
Replies: 13
Views: 300

Re: I2C , Robit Elecfreaks

Normally, an H-Bridgge will have a direction GPIO line and a PWM line to control the speed.

Do you have schematics available? It's hard to know what exactly needs to be done without knowing exactly how things are wired up.
by dhylands
Sun Sep 29, 2019 12:52 am
Forum: micro:bit boards
Topic: I2C , Robit Elecfreaks
Replies: 13
Views: 300

Re: I2C , Robit Elecfreaks

Are you using motor drivers? The PCA9685 is only rated for 40mA per channel. Your motors probably need alot more current than that.