from machine import Pin import time led = Pin ( 15 , Pin . OUT ) button = Pin ( 14 , Pin . IN , Pin . PULL_DOWN ) while True : if button . value ( ) : led . toggle ( ) time . sleep ( 0.5 ) from machine import ADC , Pin import time adc = ADC ( Pin ( 26 ) ) while True : print ( adc . read_u16 ( ) ) time . sleep ( 1 ) لمحاكاة عمل resbarry pico يمكن استخدام الموقع https://wokwi.com/projects/new/pi-pico لمواقع اخري للمحاكاة https://www.makeuseof.com/4-best-simulators-for-raspberry-pi/ لشرح جيد لتشغيل https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico/6
تعليقات
إرسال تعليق