Home
Features
_Multi DropDown
__DropDown 1
__DropDown 2
__DropDown 3
_ShortCodes
_SiteMap
_Error Page
Mega Menu
Documentation
_Web Documentation
_Video Documentation
Privacy Policy
Daftar Isi
Beranda
ESP 32 Button and LED
ESP 32 Button and LED
April 17, 2022
Button and LED
from machine import Pin from time import sleep led = Pin(2, Pin.OUT) button = Pin(4, Pin.IN) while True: led.value(button.value()) sleep(0.1)
Untuk NodeMCU ESP8266 kode nya adalah sbb
from machine import Pin import time led = Pin(2, Pin.OUT) button = Pin(0, Pin.IN) while True: led.value(button.value()) time.sleep(0.1) print(button.value())
Social Plugin
ARTIKEL
3/recent/post-list
Facebook
Subscribe Us