You already know the process. Open nano, copy and paste the material code with a right mouse click, save the file and execute the program.

Необходимо е да се абонирате за FLLCasts.com, за да достъпите това видео
- #834
- 09 Apr 2018
TL;DR.
- Copy ledButtonDemo from the material;
- Type nano ledButtonDemo.py;
- Right click in the editor to paste;
- Ctrl+O to save, Ctlr + X to close nano;
- Type python ledButtonDemo.py and follow the on-screen instructions.
Let's use that button
We will repeat the drill from the previous section: Open the material in a text editor and copy all the code.
Then type
nano ledButtonDemo.py
and right click in nano, in order to paste the code.
Control key and O will save the code and Control key and X will close the nano editor.
Type
python ledButtonDemo.py
and follow the on-screen instructions.
Python demo program using a button to control our car LED
Part of the perfect STEM course, this program needs a Raspberry Pi, a button connected on GPIO 26 and 3.3V, and an LED connected to GPIO 18.
Курсове и занятия включващи този Урок
Този Урок е използван в следните курсове и занятия.

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

Execute Python programs about button, from the computer
What is going to happen further along the course and why.
- 3
- 0
- 1
- 3d_rotation 0