This website requires JavaScript.
Explore
Help
Sign In
python
/
micropython-examples
Watch
1
Star
0
Fork
You've already forked micropython-examples
0
Code
Issues
Pull Requests
Projects
Releases
Wiki
Activity
69d083a0dd
micropython-examples
/
ldr
/
ldr.py
8 lines
108 B
Python
Raw
Normal View
History
Unescape
Escape
Add ldr
2021-04-06 04:13:17 +00:00
from
machine
import
ADC
Put reading in a loop
2021-06-17 07:52:27 +00:00
from
time
import
sleep
Add ldr
2021-04-06 04:13:17 +00:00
ldr
=
ADC
(
0
)
Put reading in a loop
2021-06-17 07:52:27 +00:00
while
True
:
print
(
ldr
.
read
(
)
)
sleep
(
1
)