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 #252 background imageLoading...
Page #252 background image
Chapter 23 Infrared Motion Sensor
252
www.freenove.com ā–ˆ
ā–ˆ support@freenove.com
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
GPIO.output(ledPin,GPIO.HIGH)
print ('led on ...')
else :
GPIO.output(ledPin,GPIO.LOW)
print ('led off ...')
def destroy():
GPIO. cleanup() # Release resource
if __name__ == '__main__': # Program start from here
setup()
try:
loop()
e xcept KeyboardInterrupt: # When 'Ctrl+C' is pressed, the subprogram destroy() will
be executed.
destroy()
It can be seen that the code is based on the same logic with the "ButtonLED" code in addition to determining
the level of the input signal.

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