EasyManua.ls Logo

SunFounder PiSloth - Page 104

SunFounder PiSloth
113 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SunFounder pisloth
like pisloth\examples. After modifying the code, you can run it directly to see the effect.
from pisloth import Sloth
import time
sloth = Sloth([1,2,3,4])
sloth.add_action("my_action", [
[ 0,-45 ,0, 40],
[0, 0, 0, 0]
])
def main():
sloth.do_action("my_action", 1, 80)
time.sleep(1)
if __name__ == "__main__":
while True:
main()
100 Chapter 4. Play with Python

Related product manuals