Compare commits

...

3 Commits

Author SHA1 Message Date
Jimmy 98fd5f6742 Add ldr 2021-04-06 16:13:17 +12:00
Jimmy 368a8d5015 Add dht11 2021-04-06 16:12:58 +12:00
Jimmy d0d27a6715 Add blink 2021-04-06 16:12:39 +12:00
5 changed files with 23 additions and 0 deletions

11
blink/blink.py Normal file
View File

@ -0,0 +1,11 @@
from machine import Pin
from time import sleep
led = Pin(2, Pin.OUT)
while True:
led.on()
sleep(1)
led.off()
sleep(1)

7
dht11/dht11.py Normal file
View File

@ -0,0 +1,7 @@
import dht
import machine
d = dht.DHT11(machine.Pin(16))
d.measure()
print(d.temperature())
print(d.humidity())

BIN
dht11/dht11_bb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

5
ldr/ldr.py Normal file
View File

@ -0,0 +1,5 @@
from machine import ADC
ldr = ADC(0)
print(ldr.read())

BIN
ldr/ldr_bb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB