So I thought logging in Python would be easy. You start logging to the command line then when that gets too much you log to a file. A bit of me still feels logging to a file in the app directory is the easiest set up. But various articles on the Internet say file logging … Continue reading Logging a Python App to journald
Category: raspberrypi
Running Scripts at Startup
And other Linux delights. Often there is a need to configure processes to start on startup and to restart on failure. On Linux systems this process is controlled via the systemd init system and system manager. Now, as with most things Linux, there are a lot of sources of information out there. Several of them … Continue reading Running Scripts at Startup
QuickPost – Discovering SSH Devices on Home Network
As the home router uses DHCP, the IP addresses of the devices on the network often change. To find devices on the network that have ssh open on port 22 you can use: where [Base IP Address] is often 192.168.1.0 for most routers and 10.0.1.0 for Apple routers.
Fixing Errors on Apache-Served Flask Apps
This is just a quick post to remind me of the steps to resolve errors on an Apache-served Flask app. I'm using Anaconda as I'm on Puppy Linux (old PC) and some compilations give me errors. Stuff in square brackets is for you to fill in. Log into remote server (I use ssh keys): ssh -p … Continue reading Fixing Errors on Apache-Served Flask Apps
Twitter Robots on a Raspberry Pi
Or how to get very quickly write-restricted by Twitter. This is a short guide to playing around with the Twitter API using Python on a Raspberry Pi (or any other Linux machine). Overview The process has four general steps: - Setup a new Twitter account and create a new Twitter app; Setup the Raspberry Pi … Continue reading Twitter Robots on a Raspberry Pi
Git / GitHub Workflow for Raspberry Pi
A quick aide-memoire for using GitHub: Create directory with 'Project Name' in Dropbox directory (extra layer of automated backup) cd 'Project Name' git init Create / copy initial files Create .gitignore file for Project git add [Files - if all can use .] git status [Check correct] git commit -m "First Commit" Go to github.com … Continue reading Git / GitHub Workflow for Raspberry Pi
Hiding Secrets from GitHub (or using ConfigParser)
As I get into the habit of using git and github for versioning I need to make sure that I hide personal settings and passwords. To do this I use ConfigParser in Python. It's pretty easy. Creating the Configuration File First create a 'config.ini' file in your code directory. I generally use a text editor or … Continue reading Hiding Secrets from GitHub (or using ConfigParser)
…and PiMatrix!
Face Detection with the Raspberry Pi Camera Board
I have a very basic face detection routine running with the Raspberry Pi camera board. To do this I used Robidouille's library functions (see previous post). I then modified the raspicam_cv.c example to use the face detection routine from Learning OpenCV. There were some tweaks so I will post the code below. You also need … Continue reading Face Detection with the Raspberry Pi Camera Board
Hacker News Update: Raspicam & WeMo
A quick update on my recent discoveries. Raspicam I now have a Raspberry Pi Camera Board (Raspicam)! There is a brilliant combo deal on at the moment allowing you to buy a Raspicam, Model A + 4GB SD card for about £35 (including VAT + shipping!)! That's £35 for a device that can run OpenCV … Continue reading Hacker News Update: Raspicam & WeMo