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 #168 background imageLoading...
Page #168 background image
Chapter 15 Servo
168
www.freenove.com
support@freenove.com
Finally, in the "while" cycle of main function, use two "for" cycle to make servo rotate from 0 degrees to 180
degrees, and then from 180 degrees to 0 degrees.
def loop():
w hile Tr ue:
for dc in range( 0, 181, 1): #make servo rotate from 0°to 180°
servoWrite(dc) # Write to servo
time.sleep(0.001)
time.sleep(0.5)
for dc in range( 180, - 1, -1): #make servo rotate from 180°to 0°
servoWrite(dc)
time.sleep(0.001)
time.sleep(0.5)

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