Raspberry Pico
This is your Services Page. It's a great opportunity to provide information about the services you provide. Double click on the text box to start editing your content and make sure to add all the relevant details you want to share with site visitors.
1
System LED
01 from machine import Pin
02 import time
03
04 led = Pin(25, Pin.OUT)
05 while True:
06 led.high()
07 time.sleep(1)
08 led.low()
08 time.sleep(1)
2
System temperature
01 import machine
02 import utime
03 sensor_temp = machine.ADC(4)
04 conversion_factor = 3.3 / (65535)
05 while True:
06 reading = sensor_temp.read_u16() * conversion_factor
07 temperature = round(27 - (reading - 0.706) / 0.001721,2)
08 print("Temperature : ", temperature)
09 utime.sleep(2)
3
Service Name
import time
import st7735
from sysfont import sysfont
LCD = st7735.TFT()
LCD.fill(LCD.BLACK)
# Pico 핀 맵 ADC0, 1, 2, ADC_VREF 중에서 내부에서 ADC4 사용
sensor_temp = machine.ADC(4)
conversion_factor = 3.3 / (65535)
while True:
# 16bit(65535)로 읽어드린 값을 3.3V 기준으로 볼 때 입력된 전압(온도에 따른 전압 변화 값)
reading = sensor_temp.read_u16() * conversion_factor
# 온도가 27도일 때 0.706V 1도가 증가시 전압은 0.001721V 씩 감소
temperature = round(27 - (reading - 0.706) / 0.001721,2)
print("Temperature : ", temperature)
LCD.text((10, 40), "Temperature : "+str(temperature), LCD.GREEN, sysfont, 1)
time.sleep(2)
4
Service Name
from machine import Pin
import time
red = Pin(16, Pin.OUT)
green = Pin(15, Pin.OUT)
blue = Pin(14, Pin.OUT)
while True:
red.value(1)
green.value(0)
blue.value(0)
time.sleep(1)
red.value(0)
green.value(1)
blue.value(0)
time.sleep(1)
red.value(0)
green.value(0)
blue.value(1)
time.sleep(1)
1
System LED
01 from machine import Pin
02 import time
03
04 led = Pin(25, Pin.OUT)
05 while True:
06 led.high()
07 time.sleep(1)
08 led.low()
08 time.sleep(1)
Let's Work Together
This is a Paragraph. Click on "Edit Text" or double click on the text box to start editing the content.