SunFounder PiCrawler Kit
Ready to explore and create with us? Click [] and join today!
3.3 Move
This is PiCrawler’s first project. Perform its most basic function - move.
Run the Code
cd ~/picrawler/examples
sudo python3 move.py
After the code is executed, PiCrawler will perform the following actions in sequence: move forward, move backward,
turn left, turn right, stand.
Code
Note: You can Modify/Reset/Copy/Run/Stop the code below. But before that, you need to go to source code path
like pisloth\examples. After modifying the code, you can run it directly to see the effect.
from picrawler import Picrawler
from time import sleep
crawler = Picrawler()
(continues on next page)
40 Chapter 3. Play with Python