Search found 2754 matches

by jimmo
Wed Jan 22, 2020 12:28 am
Forum: General Discussion and Questions
Topic: Raising documentation issues
Replies: 10
Views: 6123

Re: Raising documentation issues

+1 -- PR's are the best way to do this. Here's a very recent example from Peter: https://github.com/micropython/micropython/pull/5553

But, if you don't want to do that, it's still helpful to raise issues on github, so at least the suggested improvements are tracked.
by jimmo
Wed Jan 22, 2020 12:25 am
Forum: Development of MicroPython
Topic: How can I manually add a C module without micropython.mk?
Replies: 9
Views: 5137

Re: How can I manually add a C module without micropython.mk?

This sounds like it might require a lot more knowledge of your codebase to answer. But when you say "I don't want to tinker with the existing makefile" -- is that the existing makefile for your codebase, or for MicroPython's makefile. If it's the former, surely you had to modify your makefile to add...
by jimmo
Wed Jan 22, 2020 12:19 am
Forum: General Discussion and Questions
Topic: Garbage Collection Not Working
Replies: 11
Views: 5814

Re: Garbage Collection Not Working

It's important for the port to provide a gc_collect() because it's responsible for figuring out how to extract root pointers from the stack and CPU registers (in a port-specific way). When you say "I am trying to use MICROPY_ENABLE_GC" I assume this means you have actually enabled the GC. To explain...
by jimmo
Sat Jan 18, 2020 10:07 am
Forum: General Discussion and Questions
Topic: Is switch needed or not
Replies: 3
Views: 2414

Re: Is switch needed or not

No, it probably isn't required.

Note that the PWM input on the fan is open collector, and likely has a pull-up inside the fan to 5V or 3.3V. Be aware that the ESP32 pins are not 5V tolerant.
by jimmo
Sat Jan 18, 2020 9:53 am
Forum: General Discussion and Questions
Topic: map function
Replies: 3
Views: 9529

Re: map function

Is there equivalent in Micropython of map function in Arduino? Not that I'm aware of -- I think this generally follows the principle that anything that can be done in Python is better off left to the user's code (whether they write it themselves or use an existing library etc). Unlike Arduino, wher...
by jimmo
Sat Jan 18, 2020 8:53 am
Forum: General Discussion and Questions
Topic: Combo of a C and python module?
Replies: 6
Views: 3785

Re: Combo of a C and python module?

Makes sense, thanks for the explanation!
by jimmo
Sat Jan 18, 2020 6:18 am
Forum: ESP32 boards
Topic: Does a microcontroller need a break?
Replies: 2
Views: 1983

Re: Does a microcontroller need a break?

Is it necessary to use a sleep in "main.py" when I run a loop? I know this from programming on the computer so that the CPU is not 100% used. This is not necessary on a computer either. Only sleep if your program needs to actually slow down or to save power (i.e. if you only need to do something on...
by jimmo
Sat Jan 18, 2020 6:15 am
Forum: General Discussion and Questions
Topic: Combo of a C and python module?
Replies: 6
Views: 3785

Re: Combo of a C and python module?

At the moment there's no way for build-in modules to be packages (or subpackages), only top-level modules. See https://github.com/micropython/micropython/pull/4731 But yes, .mpy files can do this, so deshipu is right that the new native .mpy feature could help. However, I haven't managed to get a no...
by jimmo
Sat Jan 18, 2020 5:35 am
Forum: ESP32 boards
Topic: Enabling Ethernet and BLE both on micropython version 1.12 for ESP32
Replies: 16
Views: 8631

Re: Enabling Ethernet and BLE both on micropython version 1.12 for ESP32

This is now merged, so the nightly builds on https://micropython.org/download will include this. (Although there are reports of SSL issues that need to be investigated)
by jimmo
Sat Jan 18, 2020 5:34 am
Forum: Other Boards
Topic: ROCKPI-S
Replies: 1
Views: 1768

Re: ROCKPI-S

It's a Cortex A35 so at least toolchain support etc is straightforward -- i.e. porting MicroPython itself is easy, and the Unix port would probably "just work" on Linux. But I assume you're talking about a baremetal port -- maybe look at the bare-metal bcm238x (i.e. Raspberry Pi) port https://github...