Dark mode with CSS variables

Posted on Sun 09 February 2020 in WebDev • Tagged with html/css, webdev

Dark mode is the hot schnitzel these days. Not wanting to be left behind, I recently updated my site to use a dark or light mode depending on your operating system preferences. Thanks to the magic of CSS media queries and CSS custom properties (otherwise known as CSS variables) this …


Continue reading

Controlling Christmas lights with MQTT

Posted on Thu 02 January 2020 in Making • Tagged with python, arduino, xmas

I'm one of those Clark Griswold kind of guys that totally over-decorates his house. To make my lights more interesting, I've built my own light animation system which I call PiLit.

Of course, all my code is free and open source. Check it out at https://github.com/skypanther/PiLit …


Continue reading

Multiprocessing in Python

Posted on Mon 15 April 2019 in Python • Tagged with python

Modern CPUs typically feature multiple cores, which in some sense is like having multiple computers at your disposal. By default, your Python code will run on one core. But when performance is critical, you can use multiple cores to run operations simultaneously. In this article, I'll walk through how we …


Continue reading

Robovision on our 2019 FRC bot

Posted on Mon 15 April 2019 in OpenCV • Tagged with robotics, opencv, python

Now that our 2019 FRC season is over, I'd like to describe how Team 1518 implemented vision processing on our bot. We set some aggressive goals, which we aimed to achieve by using the the robovision library, OpenCV, and Python on a Jetson TX2. The primary goals of this post …


Continue reading

Introducing Robovision

Posted on Sun 10 March 2019 in OpenCV • Tagged with python, opencv, robotics

The FIRST robotics competition (FRC) challenges high school students to design and build a robot capable of performing multiple challenging tasks. These annual challenges typically involve computer vision components, such as identifying and using reflective markers to locate targets. High school computer science curriculum rarely covers software engineering topics, let …


Continue reading

Using OpenCV in an iOS app

Posted on Fri 01 February 2019 in OpenCV • Tagged with OpenCV, iOS, swift

Computer vision is cool tech ... computer vision in an iOS app is even better! In this post, I'll describe how you can integrate and use OpenCV in your Swift-based iOS app. Before we dig in to the process, let's take a look at how the finished integration will work.

Integration diagram

As …


Continue reading

Publishing to PyPI

Posted on Fri 25 January 2019 in Python • Tagged with python

I recently published my first Python package to PyPI. The guides I found on how to do so were mostly out-of-date and confusing. Of course, PyPI is reportedly coming out with new updates soon and my instructions here will soon be outdated. In any case, here's my take on how …


Continue reading

Raspberry Pi for IoT

Posted on Fri 14 December 2018 in Making, Python • Tagged with raspberry pi, making, python

I gave a presentation to the Buffalo Python meetup group in December. My talk centered around using the Raspberry Pi as a platform for IoT and embedded development. I want to share my presentation and the resources I mentioned here on my blog.

Update I presented an expanded version of …


Continue reading

Getting user input with OpenCV trackbars

Posted on Tue 16 October 2018 in OpenCV • Tagged with opencv, python

Trackbars, or sliders, are a simple way to get user input when working with OpenCV. In this post, I’ll show you how to add trackbars to an OpenCV window, read their values, and use those values in your Python scripts.

Trackbars (sliders) on an OpenCV window

To demonstrate a use for trackbars, we’ll read …


Continue reading

Multiple cameras with a single Raspberry Pi

Posted on Sun 02 September 2018 in Python • Tagged with python, raspberry pi, making

The Arducam Multi Camera Adapter board is a neat accessory for a Raspberry Pi. With it, you can connect multiple cameras to a single Pi. A single board supports up to four cameras. According to Arducam, you can stack up to four boards for a total of 16 cameras on …


Continue reading