Deliver to DESERTCART.HK
IFor best experience Get the App
Flame module and digital 13 interface with LED to build a simple circuit, making flame tipsThe digital 13 interface comes with the LED, the flame sensor access digital 3 interface, when the flame sensor sensed a key signal, LED light, and vice versa.Li Chengyuan Code:Int Led=13; / / LED interface definitionInt buttonpin=3; / / flame sensor interface definitionInt Val; / / define digital variable valSetup void (){PinMode (Led, OUTPUT); / / LED was defined as the output interfacePinMode (buttonpin, INPUT); / / define the flame sensor output interface}Loop void (){Val=digitalRead (buttonpin); / / digital interface 3 the value read is assigned to valIf (val==HIGH) / / when the flame sensor signal, LED flashing{DigitalWrite (Led, HIGH);}Else{DigitalWrite (Led, LOW);}}
TrustPilot
4天前
1 周前