Can't find [LED0]


#1

Hello, I’m new in electronics, DIY and Zerynth. I decided to start with the ESP32 and make a little project of my own for controlling a pc fan with pwm. Therefor I have loaded the pwm example to see the onboard LED fade. However when I press the verify button it says the following:

Blockquote
[info] Searching for C:\Users\Taif\PWM_Fade_builtins_.py
[info] Searching for C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib_builtins_.py
[info] ########## STEP 0 - first pass
[info] Compiling module: main @ C:\Users\Taif\PWM_Fade\main.py
[info] Searching for C:\Users\Taif\PWM_Fade_builtins_.py
[info] Searching for C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib_builtins_.py
[info] Compiling module: builtins @ C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib_builtins_.py
[info] Searching for C:\Users\Taif\PWM_Fade\pwm.py
[info] Searching for C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib\pwm.py
[info] Compiling module: pwm @ C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib\pwm.py
[error] Can’t find name [LED5] in [[C:\Users\Taif\PWM_Fade\main.py] at line 12](javascript:app.open_marker(‘c:\users\taif\pwm_fade’,‘c:\users\taif\pwm_fade\main.py’,12))
[info] Searching for C:\Users\Taif\PWM_Fade_builtins_.py
[info] Searching for C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib_builtins_.py
[info] ########## STEP 0 - first pass
[info] Compiling module: main @ C:\Users\Taif\PWM_Fade\main.py
[info] Searching for C:\Users\Taif\PWM_Fade_builtins_.py
[info] Searching for C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib_builtins_.py
[info] Compiling module: builtins @ C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib_builtins_.py
[info] Searching for C:\Users\Taif\PWM_Fade\pwm.py
[info] Searching for C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib\pwm.py
[info] Compiling module: pwm @ C:\Users\Taif\zerynth2\dist\r2.1.2\stdlib\pwm.py
[error] Can’t find name [LED0] in [[C:\Users\Taif\PWM_Fade\main.py] at line 12](javascript:app.open_marker(‘c:\users\taif\pwm_fade’,‘c:\users\taif\pwm_fade\main.py’,12))

Anyone know what I’m doing wrong? Thanks in advance!

Edit: I forgot to add the board I’m using. It’s a ESP32 DevKitC one. I found this here


#2

Hi @neptune19,

the ESP32 DevKitC has no user controllable LED :slight_smile:


#3

Does this mean that the LED on my board cannot be controlled? :frowning:

Thanks for answering!


#4

I’m now getting the next in my console:

Blockquote
E (13087) ledc: requested frequency and duty resolution can not be achieved, try reducing freq_hz or duty_resolution. div_param=62
[InvalidHardwareStatusError @[0019:001D:0000:004F:0000:0000:0000:0000]](javascript:window.except(’@[0019:001D:0000:004F:0000:0000:0000:0000]’,'InvalidHardwareStatusError '))
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:3064
load:0x40078000,len:0
ho 12 tail 0 room 4
load:0x40078000,len:11504
entry 0x40078d64

The frequency is too high, what can I do to resolve this? The standard pwm example doesn’t show anything about the frequency.


#5

hi @neptune19
Could you try to increase the value of the period and pulse time, this reduces the frequency indirectly.
for info :
https://docs.zerynth.com/latest/official/core.zerynth.stdlib/docs/official_core.zerynth.stdlib_pwm.html?highlight=pwm#pwm.write