4106 views|6 replies

1w

Posts

25

Resources
The OP
 

【ESP32 Learning】Light up the lamp [Copy link]

 
This post was last edited by dcexpert on 2018-7-28 16:55 As usual, we start with lighting up the LED. On ESP32, there is no predefined LED object. We cannot use pyb.LED(1).on() to light up the LED like on pyboard. Instead, we need to control it through GPIO. On this ESP32 learning board, the LED uses IO21 (other ESP32 boards may be different), so we can set IO21 as output and control the LED through high and low levels.
  1. from machine import Pin from time import sleep_ms LED = Pin(21, Pin.OUT) while True: LED(1) # on sleep_ms(500) LED(0) # off sleep_ms(500)
复制代码
This content was created by EEWORLD forum user dcexpert, if you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source

Latest reply

Ok  Details Published on 2018-7-29 12:53
 
 

1305

Posts

0

Resources
2
 
Good! Simple and clear.
 
 
 

1903

Posts

0

Resources
3
 
I have started learning, but I don’t have a board yet

Comments

Come and group buy  Details Published on 2018-7-28 16:55
 
 
 

1w

Posts

25

Resources
4
 
star_66666 posted on 2018-7-28 16:35 I have started learning, but I don’t have a board yet
Come and group buy

Comments

How to use E-coin for group buying?  Details Published on 2018-7-29 09:24
 
 
 

1903

Posts

0

Resources
5
 
How to use E-coin for group buying

Comments

Can you contact the administrator?  Details Published on 2018-7-29 12:21
 
 
 

1w

Posts

25

Resources
6
 
star_66666 posted on 2018-7-29 09:24 How to use E-coin group purchase
Can you contact the administrator?
 
 
 

1903

Posts

0

Resources
7
 
Ok
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list