Indice
Descrizione
In questo video scoprirai le caratteristiche della scheda Raspberry Pi Pico e come programmarla tramite MicroPython.
Inoltre vedrai come leggere la temperatura tramite il sensore integrato.
from machine import Pinfrom utime import sleep led = Pin(25, Pin.OUT) while True: led.toggle() sleep(1)from machine import Pin, PWM pwm = PWM(Pin(25))pwm.freq(1000) while True: for i in range(65535) pwm.duty_u16(i) for i in range(65535, 0, -1) pwm.duty_u16(i)from machine import ADCfrom utime import sleep sensor = ADC(4) while True: voltage = sensor.read_u16() * 3.3 / 65535 temperature = 27 - (voltage - 0.706) / 0.001721 print(temperature) sleep(1)In qualità di Affiliato Amazon riceviamo un guadagno dagli acquisti idonei