EasyManuals Logo

Freenove Ultimate Starter Kit User Manual

Freenove Ultimate Starter Kit
286 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #159 background imageLoading...
Page #159 background image
159
Chapter 14 Relay & Motor
ā–ˆ www.freenove.com
support@freenove.com ā–ˆ
35
36
37
38
39
40
41
42
43
44
45
46
47
48
print("Button is released!")
GPIO.output(relayPin,relayState)
lastButtonState = reading
def destroy():
GPIO. output(relayPin, GPIO. LOW) # relay off
GPIO. cleanup() # Release resource
if __name__ == '__main__': # Program start from here
setup()
try:
loop()
e xcept KeyboardInterrupt:
destroy()
The code is in the same logic as TableLamp code above.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Freenove Ultimate Starter Kit and is the answer not in the manual?

Freenove Ultimate Starter Kit Specifications

General IconGeneral
BrandFreenove
ModelUltimate Starter Kit
CategorySingle board computers
LanguageEnglish