1

Better RPi remote controls: CherryPy and Jinja for HTML templating

Mit CherryPy Fernbedienungen fuer freilaufende Raspberry Pis zu basteln ist schoen, aber frickelig. HTML-Templating mit Jinja erlaubt es, das Programm einfacher und sauberer zu gestalten. Der Trick beim HTML-Templating ist dabei die Uebernahme externer Parameter (hier: Variablen aus Python) und die Verwendung von Kontrollstrukturen wie for-Schleifen in einer HTML-Struktur. Continue Reading

0

Python3: Browser tests on a Raspberry Pi with Firefox, Virtualdisplay, Selenium and PyTest

A way to increase maintainability of complex websites are browsertests for automatically simulating and validating user interactions. It’s entirely possible to run browser tests solely on a Raspberry Pi with Firefox, Selenium and PyTest. With Virtualdisplay, not even a display for the Raspberry Pi is required (headless). Continue Reading

0

Color mixer: control a RGB-LED-strip with the Raspberry Pi and the N-Channel-MOSFET IRLB8721

LED strip

RGB LED strips are cheaply available these days, e.g. 5 meters strip for around 13€ on Amazon. Together with a Raspberry Pi and a few more components you can light your home or car individually in amazing ambient colors. This tutorial shows how to build a LED color mixer. The circuit and code where tested on a Raspberry Pi 3, but it should work on all models without changes. Continue Reading

0

Python Argparse massively simplifies parsing complex command line parameters

As the complexity of programs increases, the configuration effort for the user increases as well. Large programs often use configuration files, some with a graphical interface. But for many programs, well-defined command line arguments are sufficient. Since the import of parameters for complex programs is a hassle and bug-prone, the powerful Python module Argparse helps with this task. Continue Reading