Search found 1011 matches

by jimmo
Sat Jan 18, 2020 10:07 am
Forum: General Discussion and Questions
Topic: Is switch needed or not
Replies: 3
Views: 488

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: 455

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: 563

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: 460

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: 563

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: 9
Views: 694

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: 179

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...
by jimmo
Wed Jan 15, 2020 5:20 am
Forum: Hardware Projects
Topic: A novel clock display?
Replies: 3
Views: 307

Re: A novel clock display?

That's very cool -- I've experimented with e-paper in the past for numerical displays and never quite got the effect I wanted.

I do really like this concept though -- both the video you linked to and your adaptation! Looking forward to testing it out on one of my displays.
by jimmo
Tue Jan 14, 2020 11:31 am
Forum: General Discussion and Questions
Topic: Rookie question about classes
Replies: 4
Views: 560

Re: Rookie question about classes

Inside `def stop()` you need to use self.sensor (and self.motor, self.name, etc).
by jimmo
Tue Jan 14, 2020 2:21 am
Forum: General Discussion and Questions
Topic: Combo of a C and python module?
Replies: 6
Views: 563

Re: Combo of a C and python module?

1. Can you clarify what you mean by "global scope". If your python wrapper (foo.py) imports foo_mod (or from foo_mod import *), then the stuff from foo_mod will be scoped to the foo module. I'm not aware of a way to make built-in modules not appear in help('modules'). Maybe worth considering sending...