"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." (Robert A. Heinlein)
Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Sunday, 3 June 2018

Simple hardware interface for the Raspberry Pi Zero


I spent some hours, last weekend, working to another little step into my Raspberry Zero camera project. After experimenting remote software interface possibilities I started building some minimal bare hardware interface in order to, at least, safely turn on and off the Raspberry Pi.



A bare minimum interface
The bare minimum hardware interface for a Raspberry project is made of a power push-button and a status LED telling if the device is still active or it can be safely removed from power.
Plenty of tutorials are available on the Internet, I mostly followed instructions from here and here.
The power status information is directly provided from the UART pin without the need of writing additional software. UART must be enabled in ‘/boot/config.txt’ configuration file


enable_uart=1

Then I just connected a LED diode between UART pin and ground (trough a current limiting resistor of course).
Also the wake-up functionality is implemented by briefly connecting GPIO pin 6 to ground trough a normally-open push button.

Friday, 25 September 2015

The quest for new languages: Python

It happens, sometimes, that I download a “new” programming language or a framework or library in order to give it a try. Of course the word “new” is relative to my personal or professional experience, mostly orbiting around the Java galaxy. This time the “new” programming language is Python. Python is, of course, a widely used and far from being a new programming language but I never had the thought of giving it a try before.

Python on Eclipse: PyDev

I'm willing to learn new languages but I'm not so eager to install and use a new IDE while doing it. I so went looking for a Python development Eclipse plug-in and the choice fell on PyDev. Installing PyDev on Eclipse has been quite simple, just matter of selecting it on Eclipse Market Place and completing the installation wizard.
Before creating the first project PyDev plug-in needs to know where python interpreter is. There is a handy automatic search feature but I preferred the manual configuration in order to have more meaningful configuration names.