tag:blogger.com,1999:blog-93444442024-02-20T12:28:29.040-05:00Jeremy's BlogHead of Development, Software Architect and Developer by day. Data Science and Raspberry Pi dabbler by night.jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-9344444.post-33525054957037369922021-12-21T22:27:00.001-05:002021-12-21T22:27:20.943-05:00Raspberry Pi, Home Assistant controlled On Air LightOn air lightThis project was to make an On Air light that would automatically come on whenever I'm in a meeting or call on my Mac. This was achieved using Home Assistant, Home Assistant Companion for Mac, Mosquitto, Raspberry Pi, 2 Relay Module and an On Air light.SetupHome Assistant, the Home Assistant companion and Mosquitto all need to be installed and configured to connect together. In my jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-82527865493847326302021-02-27T19:40:00.002-05:002021-02-28T08:34:45.918-05:00Practical ML end-to-end project: labelling, training, inference, serverless deploymentThe EndThe goal of this project was to make a system that could play the card game Quiddler alongside human players. The reason for doing it was to have a vehicle to learn new technology. Therefore, to make this challenging I wanted a cloud hosted system to read the physical cards from a camera and deduce the best play.And here's the result: quiddler.jerbly.netWhen you visit this web page jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com1tag:blogger.com,1999:blog-9344444.post-14451328552076972832018-09-16T12:07:00.000-04:002018-09-16T12:09:39.148-04:00Serverless Machine Learning Classifier SlackBot In this post I show the steps to build and deploy a SlackBot into AWS using Chalice. The bot uses a trained machine learning model to predict the R&D team most able to answer a question that the user has entered. Like so:
The detail on training the machine learning model will be in a later post. For now just know that text from Jira tickets assigned to scrum teams labelled A to I is jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-20419476516481521942017-05-06T16:59:00.000-04:002017-05-06T17:09:17.600-04:00ControlMyPi shutting down :(Unfortunately ControlMyPi will be shutting down on September 1st due to Google removing support for XMPP :(
Since I first wrote ControlMyPi many well supported IoT platforms have come about. Most of these use MQTT for the messaging where ControlMyPi was using XMPP.
I would suggest you take a look at the IoT systems provided by Adafruit and AWS. Here’s a tutorial I wrote for Adafruit:
Monitor jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-40336409377910630682015-06-14T12:57:00.000-04:002015-06-14T12:57:05.647-04:00Motion Google Drive Uploader for OAuth 2.0Three years ago I wrote the original script to upload video to Google Drive as a trigger from Motion. Unfortunately Google recently removed support for the old security model and you now have to use OAuth 2.0. Also the gdata libraries have been superseded by the Google API Python Client. A few people have written alternatives to my original script quicker than I did, but here's my new version.
jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com1tag:blogger.com,1999:blog-9344444.post-23204595305102891182014-09-01T13:52:00.000-04:002014-09-01T13:53:39.243-04:00Raspberry Pi Pygame UI basics
Stage 1 setup
Follow Adafruit instructions for PiTFT
Get the tutorial code: git clone https://github.com/jerbly/tutorials.git
Test the setup
pi@raspberrypi ~ $ sudo python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>> import os
>>> os.putenv('jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-17249214616305681982014-06-01T05:55:00.000-04:002014-06-01T05:55:16.126-04:00Raspberry Pi Tweet Controlled RGB LCDI've written another article over on Tuts.
The article shows how to use a Raspberry Pi with an RGB LCD to monitor tweets. Tweets containing specific keywords are displayed in defined colours. It explains how to create a Twitter application to use the stream API to push data to a multi-threaded Python program.
A second follow-up article to "How to Build a Tweet Controlled RGB LCD" is jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-1066003713884145962013-09-07T01:35:00.000-04:002017-05-06T17:08:40.991-04:00Build a Raspberry Pi Moisture Sensor to Monitor Your Plants*** NOTE: ControlMyPi shutting down ***
Here's a snippet from a detailed tutorial I've written for Tuts+
....You will be able to monitor the sensor locally on the LCD or remotely, via ControlMyPi.com, and receive daily emails if the moisture drops below a specified level.
Along the way I will:
wire up and read a value from an analog sensor over SPI using a breadboard
format jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-57810721811536681282013-03-21T17:56:00.000-04:002013-03-22T11:19:21.168-04:00Raspberry Pi parking camera with distance sensorThis build brings together a few other projects to make something potentially quite useful for a change - a parking camera with distance sensor. The feed from the webcam is shown on the LCD with a distance read-out underneath. As you get closer to the object (my hand in the videos) a circle is overlaid on the video which gets larger as you move closer. Once you get to within 30cm of the object jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com11tag:blogger.com,1999:blog-9344444.post-67262288641642863952013-03-17T12:48:00.001-04:002013-03-17T12:48:26.676-04:00Raspberry Pi playing video on 2.2" LCD.I used the software and followed the guide here: https://github.com/notro/fbtft - Then I resized and rotated a video from my blog to fit the display.
The original video was 1920x1080 and this screen is 176x220 so I rotated it anti-clockwise and resized it to 220x124 to keep the aspect ratio the same but make best use of the screen. The "transpose=2" does the anti-clockwise rotation.
# jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com2tag:blogger.com,1999:blog-9344444.post-79826201951640827342013-03-11T16:49:00.000-04:002017-05-06T17:11:13.413-04:00Raspberry Pi system monitor embedded on your own site
*** NOTE: ControlMyPi shutting down ***
Above is an embedded ControlMyPi panel showing some system stats from my Raspberry Pi.
If you want to run one of these yourself set up your Raspberry Pi for ControlMyPi by following the instructions on the site and then run the script below (after changing it to use your account and password).
To embed it on your site use an iframe using the jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com2tag:blogger.com,1999:blog-9344444.post-90227643461962958262013-03-09T10:57:00.000-05:002013-03-09T12:03:52.597-05:00Raspberry Pi midi driven solenoid bellThis is completely pointless but a bit of fun I had to share. I've been thinking about hooking my Roland TD9 v-drum kit up to a Raspberry Pi for a while for another project so I bought a really cheap Midi to USB gadget: USB Midi Cable Lead Adaptor
To my surprise this worked out-the-box, nothing to install. I made sure my Raspbian OS was up to date before I started but that was it. I have never jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-34977842460022083032013-02-24T11:44:00.000-05:002017-05-06T17:12:32.712-04:00Live Web Bicycle Dashboard - the code*** NOTE: ControlMyPi shutting down ***
This post is a walkthrough of the code running on the Raspberry Pi as seen in the previous post: Live Web Bicycle Dashboard using ControlMyPi. This file, and the required mcp3008.py, are available in the examples from ControlMyPi. See "How to connect your pi".
Firstly at the top of the file are a few constants to use with ControlMyPi. The jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-89367836281509638052013-02-19T01:37:00.000-05:002017-05-06T17:13:12.380-04:00Live Web Bicycle Dashboard using ControlMyPi
*** NOTE: ControlMyPi shutting down ***
This post shows how I set up a Live Web Dashboard from a Raspberry Pi as seen in the video above. In case you haven't worked it out, what's going on here is the Raspberry Pi is using 3G to send GPS and accelerometer data up to ControlMyPi. Users can then log in to ControlMyPi and watch the Live data displayed on the dashboard. In this case I'mjerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com2tag:blogger.com,1999:blog-9344444.post-28122707635428222502013-02-03T14:44:00.000-05:002017-05-06T17:16:24.928-04:00Control My Pi - Easy web remote control for your Raspberry Pi projects*** NOTE: ControlMyPi shutting down ***
I'm launching Control My Pi Beta today. In just a few lines of Python code you can create a control panel for your project accessible over the Internet. No firewall changes to make, no web servers to set up. Pick up your Raspberry Pi, take it to a friends house or work, school, a club, a coffee shop - connect it to 3G and carry it around or jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com2tag:blogger.com,1999:blog-9344444.post-27399384901983093602012-11-15T01:50:00.000-05:002012-11-15T04:01:05.488-05:00Raspberry Pi solenoid alarm bell
Controlling components on a separate power supply from the Raspberry Pi. This project uses a PIR sensor, an IR range sensor, a solenoid, a reception bell and some bright LEDs to form a proximity alarm system.
I'm not sure if there's any real practical use for what I've made here but some of the techniques, both with the electronics and the software may be of interest. It was fun making it jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com2tag:blogger.com,1999:blog-9344444.post-91237767442000040502012-09-08T10:22:00.003-04:002012-09-08T13:12:08.756-04:00Raspberry Pi distance measuring sensor with LCD output
Measure distances from the Sharp GP2Y0A02YK0F sensor using an MCP3008 ADC and hardware SPI.
The Sharp GP2Y0A02YK0F can be powered from the 5V supply on the Raspberry Pi. The Analog output is less than 3V and so can easily work with the logic level circuit. If you buy one of these look for the cable that goes with it to save you some bother.
This project builds on two jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com6tag:blogger.com,1999:blog-9344444.post-77711138422506067102012-09-05T15:53:00.000-04:002012-09-08T09:49:20.370-04:00Raspberry Pi hardware SPI analog inputs using the MCP3008
A hardware SPI remake of the bit-banged Adafruit project: Analog Inputs for Raspberry Pi Using the MCP3008.
Take a look at the Adafruit project and particularly the datasheet for the MCP3008 - what we're making is a hardware volume control using a 10K potentiometer. Instead of using the GPIO pins and bit-banging the SPI protocol I'm using the proper SPI pins and the hardware driver.jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com14tag:blogger.com,1999:blog-9344444.post-27791046888903742312012-08-26T09:27:00.001-04:002012-08-29T11:06:23.889-04:007 segment display webcam stats
I have finally switched off and dismantled my 7 segment display webcam project. It ran for a couple of weeks before the post went up on the Raspberry Pi web site: "Controlling a 7-segment display from half a world away" on 30th July. My poor little Raspberry Pi couldn't cope with all this attention very well but after the immediate spike of activity subsided it stood up to the challenge jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com0tag:blogger.com,1999:blog-9344444.post-91282208346104307272012-07-28T14:12:00.001-04:002012-07-29T05:21:41.471-04:00Raspberry Pi with TextStar Serial LCD DisplayThe TextStar Serial LCD Display from Cat's Whisker Technologies is a nice little 16x2 display. It's quite a sophisticated screen including 4 buttons to transmit characters too. It's a perfect companion for the Raspberry Pi as you can run it straight off the 3.3v supply and TTL serial pins without the need for an RS232 converter like a MAX232. It couldn't be easier!
As the video shows I have jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com9tag:blogger.com,1999:blog-9344444.post-61304079378154685962012-07-21T10:12:00.001-04:002012-07-22T04:51:58.762-04:00Raspberry Pi 7 segment displaysThis post shows how to drive two 7 segment displays from 6 gpio pins on the Raspberry Pi without a continual refresh loop. The software is simple with very low cpu usage - only processing when you want to change the displayed numbers. The electronics are pretty easy too (I'm a novice myself!) It's also a fun way to learn about BCD (Binary-coded decimal) and latches.
Hardware
To put this jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com21tag:blogger.com,1999:blog-9344444.post-91446327096960888322012-07-02T13:45:00.000-04:002012-07-02T13:55:51.874-04:00Raspberry Pi GPIO and MotionThis post shows how I've set up Motion with the Raspberry Pi GPIOs to indicate motion detection and video production on LEDs and a push button snapshot control. As part of this project I have created a Python service to allow easy scripted control of the GPIOs. This allows you to set up commands you want to run on GPIs and simple command line access to set GPOs high, low or flash. If jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com1tag:blogger.com,1999:blog-9344444.post-22828282314434900522012-06-13T01:35:00.000-04:002015-06-14T13:01:55.039-04:00Motion Google Drive Uploader and Emailer
***** UPDATE: The script in this article no longer works due to Google authentication changes. Please use the new script described here: Motion Google Drive Uploader for OAuth 2.0
I'm using the brilliant Motion software with my Raspberry Pi to capture goings-on around my house. This blog post: Battery powered, Wireless, Motion detecting Raspberry Pi and this blog post: jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com37tag:blogger.com,1999:blog-9344444.post-51446671964057854742012-06-05T02:14:00.001-04:002012-06-13T08:17:50.265-04:00Battery powered, Wireless, Motion detecting Raspberry Pi
Hardware
Raspberry Pi
ASUS USB-N10 Wireless Lan USB Adapter
New Trent iCruiser 11000mAh External Battery Pack
Microsoft Lifecam Cinema
Waterproof plastic box
Software
Arch Linux ARM
Motion
Lighttpd
Set up
Update Arch
Before installing any new software it's a good idea to get up-to-date. I was caught out with an issue which seems to be catching others out jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com53tag:blogger.com,1999:blog-9344444.post-84067855323878580912012-05-20T01:24:00.000-04:002012-05-20T01:25:04.048-04:00Python FreeDNS client (on Raspberry Pi)I'm using FreeDNS - a dynamic DNS provider for my Raspberry Pi. If you sign up and follow the instructions on their site you can quickly have a nice name for your site like mine: Jerbly
To keep your external dynamic address updated with FreeDNS there are a number of clients (scripts) available. Since this is Raspberry Pi though I had to have one in Python.
#!/usr/bin/python
import urllib2
jerblyhttp://www.blogger.com/profile/03046368186007640865noreply@blogger.com4