E-Paper button badge

Hi everyone! I’ve completed this project and put the source code on github here:

https://github.com/jstainbrook/epaperbadge

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!

–hyperjoule

The Discord Dad Bot

Once in a while, I’ll challenge myself and take on something just a bit outside my lane. This is one such thing. Mind you, I have been developing in javascript and jQuery for years, so I know javascript very well. The javascript node.js framework was a bit new to me, and this was a good opportunity to learn it!

C’mon, they’re funny, you know it.

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

THE DAD BOT.

Feel free to clone and adapt for your own Discord server!

–hyperjoule

The Button Badge

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.

This little badge normally sits by my R2-D2 cam when not in use.

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.

Regards,

hyperjoule

The R2-D2 Nightlight and Death Pi

R2-D2 Lamp – Project Notes/How To Guide

Update: Because of the cost of maintaining the project on the internet, I have disabled the active link. This article is for project reference only. For personal use, the initial implementation of this project is available on GitHub.

–hyperjoule

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!

The repository for this project is hosted here:

https://github.com/jstainbrook/r2_d2-local/

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. 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.

The inside of the Death Star

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!

Yup, that Death Star is powering the Camera!

And, just to show you what the pi zero w with the unicorn pHat looks like when not under the acrylic:

Cool, huh?

If anyone makes one, please let me know! I’d love to see other implementations of this!

–hyperjoule

Adding auto-incrementing badges to icons in Bootstrap 4.0

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.

I’ve put this example up on bootsnipp:

https://bootsnipp.com/snippets/PDPN5

Check it out! On bootsnipp, it’s just pulling a number from random.org and refreshing for demo purposes, but the source of the number can be replaced with an SQL count(*) query.