Here we will start sending manual commands to our Raspberry Pi micro-computer and it will execute them for us.

To access the full video please subscribe to FLLCasts.com
- #830
- 09 Apr 2018
TL;DR.
Type
cd Perfect_Programs
then
python ledOn.py
and a diode on GPIO 18 will blink again.
The command line
Now that you have established SSH connection to the Raspberry, you are in its command line interface in short CLI. We also refer to it as the Console.
This interface looks rather boring, but it is the most powerful computer tool that you will have, if you master it. The power comes from the possibility to send commands to your computer - hense Command Line. The commands can be anything: copy a file, open a file for reading, restart the computer, or even delete every last thing in the computer.
Keep in mind that you can use TAB to force completion of commands and ask for filenames sugessions. A similar concept is implemented when typing Minecraft commands.
Change directories a.k.a folders
First we need to go where the python programs live in the Raspberry. That actually can be anywhere in the computer, but now we go to a specific folder.
The command "cd" is short from "change directory" and we will go in folder Perfect_Programs with the help of the command
student@PerfectPi:~$ cd Perfect_Programs/
Hint: you can see long list of folders and programs in the current directory with the command "ll" (double L).
Ask Python to execute a program
In the folder Perfect_Programs there is one special program that you already have observed working. Its name is ledOn.py and it causes ... Actually, see for yourself.
Ask Python to execute the program ledOn.py with the following command:
student@PerfectPi:~/Perfect_Programs$ python ledOn.py
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Perfect STEM course. Module 1 - Smart Car with Raspberry PI
Disassemble a remote control car. Change the brain of the car with a smart computer like Raspberry Pi. Build a smart device with artificial intelligence that you could control from your phone and that could freely navigate itself in the real world and on the Internet. Use your hands. Develop programs for your robot and your phone. Be curious and invent.
The perfect course lives up to its name. You move through the content, we check it and return feedback to you.
In the end, you should be able to better understand how to program and design smart devices that would make the world a better place. For everybody age 12+, 16+, 21+, 35+, etc. The hardware costs about 150$. It changes through the years so it might take some time for you to find it as Raspberry PI, motor drivers, power banks and h-bridges.. they change. Note that the course was designed to be led by a teacher with a decent knowledge in embedded hardware and software. This, on the other hand should not stop you, if you are curious.
- 118
- 42:47
- 136