How to run Python programs on Raspberry Pi:
1. RaspBerry system settings
1. First, connect the development board without power Hardware, and sensors used in the project. For example, the current project requires plugging the LED light into the breadboard, and then connecting the development board and the breadboard through DuPont cables. The hardware platform is now built.
2. Secondly, open the Raspberry Pi development board 3B and connect it using vnc.
3. Turn on the ssh function.
As shown below, Raspberry Pi Configuration
Enable SSH connection function. Then click OK
The changes need to be restarted to take effect
2. Use ssh to connect to the development board Raspberry Pi
1. Open File Zilla has been installed in advance, enter the IP address, account, and port number, and connect to the Raspberry Pi's Linux system
#2. Create a storage development project in the current pi directory folder. Create a specific project folder on the project folder to store the project files. For example, create an LED lamp project in the DIYdemo directory
#3. Place the python program file written on the PC into the LED folder.
3. Run the python code
1. Open the VNC software and click the menu--programming--python3 (EDLE)
2. Open the written program and run the python program
For more Python related technical articles, please visit Python Tutorial column for learning!
The above is the detailed content of How to run python program on Raspberry Pi. For more information, please follow other related articles on the PHP Chinese website!