Search found 32 matches

by nagylzs
Mon Dec 23, 2019 12:10 pm
Forum: Development of MicroPython
Topic: How can I create a method with 3 non-keyword parameters?
Replies: 2
Views: 176

How can I create a method with 3 non-keyword parameters?

We have these:

Code: Select all

MP_DEFINE_CONST_FUN_OBJ_1
MP_DEFINE_CONST_FUN_OBJ_2
MP_DEFINE_CONST_FUN_OBJ_3
But there is no

Code: Select all

MP_DEFINE_CONST_FUN_OBJ_4
. Is it intentional? Should I always use mp_arg_parse_all instead for methods with more than 3 parameters (including self)?
by nagylzs
Fri Dec 20, 2019 6:20 am
Forum: Development of MicroPython
Topic: Which timers are reserved for esp32?
Replies: 0
Views: 331

Which timers are reserved for esp32?

I'm in the process of writting a module for MP. I need to use a timer. I have noticed that esp32 uses Timer 1 for PWM here: https://github.com/micropython/micropython/blob/master/ports/esp32/machine_pwm.c#L57 So it is a fixed Timer number, and probaby I cannot use this timer for a different purpose....
by nagylzs
Thu Dec 19, 2019 6:11 pm
Forum: General Discussion and Questions
Topic: dim LEDs
Replies: 5
Views: 207

Re: dim LEDs

I'm working on a LEDC driver for MicroPython and ESP32 that will be able to do fading from hardware, in the background. It is in early stages, but it might be usable next year. For esp8266, there is no such solution.
by nagylzs
Wed Dec 18, 2019 3:21 pm
Forum: Development of MicroPython
Topic: IDE setup for micropython development
Replies: 1
Views: 207

Re: IDE setup for micropython development

Also, compilation errors are not clickable.

Example:

https://imgur.com/EPCYVnE


It might be because in the error message, the path is relative to the micropython/ports/esp32 build dir, I'm not sure.
by nagylzs
Wed Dec 18, 2019 3:12 pm
Forum: Development of MicroPython
Topic: IDE setup for micropython development
Replies: 1
Views: 207

IDE setup for micropython development

I'm trying to setup Visual Studio Code under Linux, to be used for MicroPython development with esp32. I'm using this directory structure: / |- esp-idf |- micropython |- modules |- xtensa-esp23-elf Here, "micropython" contains the micropython source code, and the "modules" directory is for custom ex...
by nagylzs
Wed Dec 18, 2019 6:29 am
Forum: General Discussion and Questions
Topic: PWM hardware fade
Replies: 8
Views: 369

Re: PWM hardware fade

That helps, thank you!
by nagylzs
Tue Dec 17, 2019 7:55 pm
Forum: General Discussion and Questions
Topic: PWM hardware fade
Replies: 8
Views: 369

Re: PWM hardware fade

I could create a custom C module that fades a led with the LEDC driver. So maybe I'm going to create it as a custom module, and test it before I try to put it into the core micropython repo.
by nagylzs
Tue Dec 17, 2019 6:07 pm
Forum: General Discussion and Questions
Topic: PWM hardware fade
Replies: 8
Views: 369

Re: PWM hardware fade

Can you please tell me how to start a new empty module in this project? I was reading this documentation about user modules: https://github.com/nagylzs/micropython/blob/master/docs/develop/cmodules.rst Should I implement this as a user module, or should I try to put it under micropython/ ? I have al...
by nagylzs
Tue Dec 17, 2019 5:44 pm
Forum: General Discussion and Questions
Topic: PWM hardware fade
Replies: 8
Views: 369

Re: PWM hardware fade

All right, I could install the toolchain, compile a new firmware and burn it. It seems to be working.

Next step will be to examine the C code for PWM and Timer, make changes and test it.

Thanks