Getting Festive with some Addressable LEDs: the Fireplace

Not content with just one hardware hack this Christmas, I thought I should try to create something simpler, prettier and considerably less nerdy than the TfL Tree.

Back at the parents’ house we have a fireplace that I thought could do with a festive makeover. I found this 5m strip of LEDs on Amazon. It was surprisingly difficult to find LEDs that were well-separated: many of them were very close together, and therefore, very expensive. The set I bought had lights separated by about 3cm each, 150 LEDs in total.

The great thing with the WS2812B standard of LEDs (and similar) is that you can cut a strip to the exact length you want and solder them back together if you want. This particular strip had an adhesive back for more permanent applications, but since this was temporary I didn’t cut the strip, and I used Blu Tack to attach the strip around the fireplace. It worked well enough!

IMG_20191225_173353.jpg
I hid the strip badly behind a table and didn’t think about it again.

 

Espruino

Since this project didn’t need to talk to the Internet, I wrote a program using an Espruino Pico microcontroller that I bought after a JSOxford hardware hack day in 2015. The advantage of the Espruino over a Raspberry Pi is that it will start up and run the program instantly. It also runs JavaScript, which is probably more familiar to most people than whatever language you use to program an Arduino.

Continue reading “Getting Festive with some Addressable LEDs: the Fireplace”

Getting Festive with some Addressable LEDs: TfL Tree

This is a story of how a simple hardware hack got surprisingly out of hand.

Summer of Hacks 2019

It all started in the summer of 2019 during the Oxford Summer of Hacks. One of the events put on was a hardware hack day, where beginner tinkerers could learn about programming real things with the help of more knowledgeable people in the room. I was somewhere in the middle of the scale: I know how to program so I managed to teach a kid and his dad to write some code for a robot powered by a BBC micro:bit, but I needed help when it came to the most basic of hardware tasks.

I had a vague idea of what I wanted to work on during this hack day: after reading a blog post from the Raspberry Pi Foundation I ordered a small screen thinking I could get it to display the Tube status. However, that didn’t arrive in time, so I had to improvise with some LEDs instead.

Continue reading “Getting Festive with some Addressable LEDs: TfL Tree”

Realtime hacking with JSOxford

Yesterday I went to a hack day run by JSOxford. The theme was ‘realtime’, i.e. using Web technologies to update a site automatically from a data source.

Since I had no experience with realtime technologies before I came, I didn’t want to make anything too ambitious! I just wanted to learn the basics so that I could make something useful in the future.

Continue reading “Realtime hacking with JSOxford”

MS Word How To: Different Alignments on the Same Line

TL;DR: View the ruler, click the L symbol twice, then click (and drag) your mouse across the ruler to the right margin. When typing, press tab to switch to right-aligned.

We were going over some past papers in one of my lectures the other day. The questions were put up on the projector and we discussed what we would write as answers. The questions typically look like this:

Rather than answering the question, one of the students asked how our lecturer had aligned the number of marks to the right, but the rest of the question on the same line was aligned to the left of the page.

Continue reading “MS Word How To: Different Alignments on the Same Line”

Website of the Week – ifttt.com

This “Website of the Week” isn’t going to be a regular occurrence, but IFTTT sent me a text a couple of days ago, and I decided to write about it because it’s pretty cool.

IFTTT stands for “If This Then That”, and it is an online utility to perform a particular action when a particular event occurs.

I’ll try to explain that again. You connect IFTTT to your other online accounts such as Google, Facebook and Dropbox. There are lots of different triggers that can occur. For example, every day at a particular time; when you are tagged in a photo on Facebook; or when you send IFTTT an email with a particular subject. You can add services like Yahoo weather and you can connect your mobile phone as well.

By connecting all these services, you can perform a whole range of tasks. For example, if you are tagged in a photo in Facebook, it can automatically be saved to SkyDrive; every time you write a blog post with a particular tag, post it to Facebook automatically; send you an email when an RSS feed updates; or if it’s forecast to snow tomorrow, send me a text!

Text alert from IFTTT

All of this crazy functionality, and the service is completely free!

 

Setting up a rule

I’ve mentioned only a few services. Here’s a picture of all the other services you can use to make rules. I have no idea what most of them do.

ifttt channels

Let’s set up a rule so that if one of my programs on my Raspberry Pi crashes, IFTTT will send be a text. Now obviously a Raspberry Pi can’t send texts on its own, but it can send emails. I’m not going into the details of how to send an email when an error in my program occurs, but the important bit is that it sends from my Gmail to trigger@ifttt.com. IFTTT can read emails and send texts accordingly, so technically, it has given my Pi the ability to send texts when it couldn’t before.

 

IF THIS

I want the event to occur if IFTTT receives an email from my Gmail account with the hash tag #textme.

When you create a new recipe, click on ‘this’, then ‘Email’

if this

THEN THAT

We then need to send the content of the email to my phone.

then that

It’s as simple as that.

 

https://ifttt.com/