Can't blink ESP32 WROOM

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
gertmes
Posts: 3
Joined: Wed Jan 03, 2018 11:11 pm

Can't blink ESP32 WROOM

Post by gertmes » Thu Jan 04, 2018 12:15 am

Hi, Please excuse if I'm posting in the wrong section - I'm a Noob.
I have a ESP32 WROOM DOIOT DEV BOARD and I can't get the on-board LED to blink.

This link says my on-board LED is GPIO 2:
http://www.instructables.com/id/IOT-Mad ... -Arduino-/

I get the following error when trying:

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_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:4332
load:0x40078000,len:0
load:0x40078000,len:10992
entry 0x4007a6c4
I (204) cpu_start: Pro cpu up.
I (204) cpu_start: Single core mode
I (204) heap_init: Initializing. RAM available for dynamic allocation:
I (208) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (214) heap_init: At 3FFDCD68 len 00003298 (12 KiB): DRAM
I (220) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (226) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (233) heap_init: At 4008FC7C len 00010384 (64 KiB): IRAM
I (239) cpu_start: Pro cpu start user code
I (33) cpu_start: Starting scheduler on PRO CPU.
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-231-gd3fbfa49 on 2017-12-29; ESP32 module with ESP32
Type "help()" for more information.
>>> import machine
>>> import time
>>> led = machine.Pin(2, machine.Pin.OUT)
>>> led.high()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Pin' object has no attribute 'high'
>>>

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Can't blink ESP32 WROOM

Post by Roberthh » Thu Jan 04, 2018 12:35 pm

The led.high() and led.low() methods have been discontinued. Use led(1) and led(0), or led.value(1) and led.value(0)

Post Reply