pibot:lesson3:softwarewin
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pibot:lesson3:softwarewin [2021/08/08 16:03] – Fixed host name for connecting jstruebel | pibot:lesson3:softwarewin [2022/10/20 19:53] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Software Setup ====== | ||
+ | - Open the VSCode from the Applications directory on the flash drive | ||
+ | - Click on the small green square in the bottom left corner of the screen\\ \\ <WRAP box>{{ : | ||
+ | - Select the " | ||
+ | - Type " | ||
+ | - Click the "Open Folder" | ||
+ | - Select the " | ||
+ | - Open a terminal in Visual Studio Code from the Terminal-> | ||
+ | - Type the following command and press enter to download the Python code for this lesson\\ \\ < | ||
+ | - Type the following command and press enter to make the PiBot drive and avoid obstacles\\ \\ <WRAP round important> | ||
+ | - Hold down the Ctrl + C keys to stop the PiBot | ||
+ | |||
+ | ===== Software Explanation ===== | ||
+ | |||
+ | - Select the picar-obstacle-avoid.py file in the list on the left to view the code that makes the PiBot run\\ \\ <WRAP box>{{ : | ||
+ | - Find line 33 in the picar-obstacle-avoid.py file. What is the name of the variables on that line and the ones below it? What do you think they are for based on their names?\\ \\ <WRAP round tip>If you don't remember what a variable is, review the description from [[: | ||
+ | - Find where the measure function is defined. What is it doing? Compare the steps in the function to the " | ||
+ | - Find the main loop in the code. What is the code doing to make the robot sense obstacles and move? What would you do to make it move smoother without stopping? Make those changes to the code and save it with File-> | ||
+ | - Type the following command in the Visual Studio Code terminal and press enter to make the PiBot move with your changes\\ \\ < | ||
+ | - When you're finished testing out your changes type the following command in the Visual Studio Code terminal and press enter to shutdown the PiBot\\ \\ < | ||
+ | - Click on the small green rectangle in the bottom left corner of the screen and select "Close Remote Connection" | ||
+ | - Wait 3-5 minutes for the green light on the Raspberry Pi to stop flashing and turn off the switch on the PiBot battery | ||
+ | |||
+ | [[: |