SunFounder PiCrawler Kit
Run the Code
cd /home/pi/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([10,11,12,4,5,6,1,2,3,7,8,9])
#crawler.set_offset([0,0,0,0,0,0,0,0,0,0,0,0])
def main():
speed = 100
while True:
crawler.do_action('forward',2,speed)
(continues on next page)
3.3. Move 47