This is actually the first of two projects I intend to publish using the Pimoroni button shim. The second (upcoming) post is for an all-in-one webcam/media controller that I built as a ‘kitty cam’ — It isn’t launched yet, and I haven’t actually completed the project, but I do have the button shim already coded to start/shut down a web server, email a photo taken from the webcam through gmail and upload an instant photo right to my WordPress media library so I can immediately go and embed the photo in a post.
It can also start/stop a twitch stream with one button — all running on a Pi Zero W so stay tuned!
Greetings! I have completed the README.md guide and promoted the repository for a local version of this project (not the internet streaming version — it requires a lot more manual configuration and an EC2 server) so that you can get one of these neat little toys running on your own home network!
Follow the instructions in the README.md. Note: this is my first ever completed PUBLIC repository, and this is version 1.0 — if any of my instructions are not clear, please let me know! I am hoping that I have provided clear enough instructions so that someone with a little linux knowledge and some basic soldering skills can set this up for themselves at home.
Some notes on this project — for the live version hosted at http://r2d2.hyperjoule.io, I initially in the beta stages had this streaming on my desk at home. This — for all sorts of reasons — was not a good idea. Mostly, it took up too much GPU and processor speed, and therefore wasn’t ideal to be running as a simple 24/7 twitch stream. Plus, my cat kept knocking it over (along with me, every time I’d move something on my desk).
I had made a while ago this awesome looking Death Star that I used for a Retropie build.
It was already set up with a low profile fan and a momentary LED interrupt I could use for safe startup/shutdown (I will cover the building of the Death Star and the setting it up as a twitch streamer in another post!). This Death Star (and yes, I’m a total Star Wars nerd) was just sitting on a shelf as I found it wasn’t really practical as a retropie machine. Something about round cases and usb joysticks don’t really work out very well — I got tired of chasing my retropie across the floor in the middle of playing a game!
So, awesomely enough, I have a low power themed twitch streamer running 24/7 right next to my LED lamp!
And, just to show you what the pi zero w with the unicorn pHat looks like when not under the acrylic:
If anyone makes one, please let me know! I’d love to see other implementations of this!
Currently, this little iOT Lamp is running on a pi-zero-w with a Pimoroni Unicorn pHat. The scripts are all written in python — some of which are the examples that come either with the Pimoroni BlinkIt or Pimoroni Unicorn, others of which I pulled from some of the Adafruit NeoPixel libraries, and yet a couple of which I wrote myself. The webserver itself is running right on the pi-zero-w — apache2 and php 7.2 — and is configured to launch an ssh connection from Amazon EC2 to my home R2-D2 lamp to send the commands.
One of the things I’m currently working on is a five-button auto cam that captures what my cat is up to, because she’s a brat.
I still have some things to tweak in my script, but one of the cool functions is snapping a current photo with the webcam and uploading it right to my blog, so it is in my media folder when I go to post. Check it out!
Source code will be up on github and instructions will be here once I work out all the kinks :).
Discord is a chat server. I mostly stay on the #sudomod channel with other makers and developers and RetroPie enthusiasts, so I’m not a huge Discord user, but I’ve become quite fond of my little Discord group of fellow retro-gamers.
Discord has bots — automated users that are detached from real people, running scripts that control their behavior somewhere off on the internet.
The last time I wrote ‘bot’ code, it was back in the early 1990s for IRC, which is the predecessor to your modern day chat clients. In the early 1990s, the internet was very small and mostly local and not as popular as online services, as you needed a true unix system (Sun Solaris is what I used) in order to access it. There was a time when the only browser available was Mozilla — not FireFox, but Mozilla — and Mozilla didn’t run on Windows.
Usenet and IRC were the way that you reached out to the world at large in the early days of the internet. And a bot could stay online at all hours — friends in other time zones? Afraid you were going to miss a message? Your bot could store it for you!
Imagine my surprise when I found that yes, bots are still a thing, and they’ve become a FUN thing.
The channel I’m on already had a ‘yo momma’ bot — and so, I present
So, I’m quite fond of all those fun little tech badges that people wear to tech conferences. People get really creative with them.
So, this particular badge came to be because of my love of e-paper screens and the fact that once the image is presented to the screen, they don’t require power to maintain it.
It has a Pimoroni button shim soldered neatly between the pi-zero-w and the e-paper display, giving me a low profile 5 button input that I was able to program to call different python scripts on the pi that change the output on the display. When the pi receives power, the button shim will flash briefly after the boot-up sequence, letting you know when it is ready to use.
The LED on the button shim also provides a good status indicator for when it is done updating the e-paper display (the refresh rate is slow and it can take up to a full minute to execute a change). Since we are running this headless (without terminal or monitor), we don’t have the feedback displayed on the screen to know when the processes are finished being executed. In my scripts, I have included the button shim library, and I have it turning the light off on successful completion of each activity.
Anyway, I plan on putting up a video of the badge powered up and in use, as well as a link to the repository on github and instructions on how you can make one of these for yourself.
That facebook icon that tells you how many new messages you have? Useful, huh? You don’t leave the page, and it gets updated. It’s a little trick done with a combination of SQL and asynchronous jQuery.
I needed to implement notifications for a few applications at work, so I’ve found a way to implement this with just a few lines of jQuery and an asynchronous call to the database.