Enterprise Mobile App Development : Dallas Fort Worth Metroplex

Raspberry Pi Engineered With Python

Python is a scripting language that is very light weight and powerful. The scripts are run on a virtual machine (VM) much like Java but instead of the source code being compiled all at once then a compiled class ran on the VM, the scripts get compiled and ran line by line. Since most python scripts are short and used in low memory systems, this is one of the best languages to use with microcontrollers.

Raspberry PiPython is already a part of the Raspian OS which is the most common OS used on Raspberry Pis, so installation is not hard at all. You may want to update the language to the newest version or add libraries for interaction with WiFi or the GPiO pins, but this is very simple using the commands specific to the download you are searching for.

When you get the distribution of Python you want using it is just as simple as the update. The easiest way to write and run the Python scripts is to connect your Pi to a network and SSH into your device. By doing this you will be able to transfer files to and from your machine and microcontroller and also run commands on the Pi command line. This connection method will allow you to write your scripts on your local machine and transfer them to the Pi and see results right away. To run your scripts on the Pi make sure you are in the directory that the .py file is located. From there you can run the command “python my_python_file_name.py” and the program will execute. If your program needs elevated privileges, you can add the sudo command to the front of your command so that it looks like this “sudo python my_python_file_name.py”. By using Python with the Raspberry Pi your limitations are only the memory and processing power provided by the microcontroller.