DoESLiverpool / st-johns-beacon

A large scale model, 3D printed, St John's Beacon (Radio City Tower)
0 stars 0 forks source link

Create the Arduino program to flash the letter lights #3

Open DefProc opened 9 years ago

brett-lempereur commented 9 years ago

What sort of LEDs are you using? I have some spare neopixel strip lying around if it'd be helpful.

DefProc commented 9 years ago

@amcewen had a strip of WS1606 so I designed the letter block ring with a 20mm pitch. The WS1606 has a much bigger pitch than this (~40mm?) but with the silicon sleeve stripped off, it folds nicely to 20mm and should clamp/glue in place. slicon

The older strip is a bit more limited (9 colours, and heavy processor use for PWM) and we can install it indefinitely. But I know the neopixels are much better.

What's the pitch like on the strip? (nothing's printed yet) And would you mind that we'll need to strip the weatherproof cover to fit them?

brett-lempereur commented 9 years ago

Specification here, feel free to strip the cover, it'll never be used! Not sure if I have enough, but I can swing by tomorrow with what I have if its useful!

brett-lempereur commented 9 years ago

I've made some progress with this. The embedded lights can be controlled by sending a 24-bit RGB message to an MQTT broker. Next step is to write a Twitter bot that when prompted will set the lights to the given colour, take a photo of the tower using a PiCamera, and tweet a response + photo -- any ideas/tips would be appreciated!

amcewen commented 9 years ago

NodeRED could easily do the Twitter to MQTT and tweeting out at the end - the only bit you'd need to add would be the photo part. If you can do that from the command-line that could also be done in NodeRED - maybe write a script that takes a photo and outputs its filename to stdout? NodeRED would read in the stdout and then attach that picture (I think, haven't checked how you'd upload the photo to Twitter, or if it'd need tweaks to the NodeRED twitter node)

amcewen commented 9 years ago

Having a quick poke round the NodeRED twitter node (http://flows.nodered.org/node/node-red-node-twitter) it seems that if you attach a javascript Buffer object as msg.media, then it'll get attached as an image, and there'll be ways to read a file into a Buffer...

Shout if you run at it in NodeRED and need any help...

brett-lempereur commented 9 years ago

I've had a crack at this in Python (not much time, used what I know), and uploaded the code to https://github.com/brett-lempereur/beaconbot. It's totally untested (haven't even run it), will have another look tomorrow and can hack the remaining bits together at Maker Night!

DefProc commented 9 years ago

I didn't realise that you weren't in the members list for the DoES Liverpool organisation on github. You have an invite now, so you should be able to push to this repo.

If you'd rather it beaconbot stay in it's own repo, cool. When you're ready, I'll submodule it from this one.

On 20/06/15 23:07, Brett Lempereur wrote:

I've had a crack at this in Python (not much time, used what I know), and uploaded the code to https://github.com/brett-lempereur/beaconbot. It's totally untested (haven't even run it), will have another look tomorrow and can hack the remaining bits together at Maker Night!

— Reply to this email directly or view it on GitHub https://github.com/DoESLiverpool/st-johns-beacon/issues/3#issuecomment-113826450.

brett-lempereur commented 9 years ago

Cheers, after hacking and fixing it tonight (and not including my credentials in the commit) I'll put it into this repository!

brett-lempereur commented 9 years ago

Okay, this is now done, see http://twitter.com/doestower. The bot code and everything is up at https://github.com/brett-lempereur/beaconbot, the JSON file in the root is the Node-Red workspace. Submodule away!

I've added you and adrian as collaborators on it, so please start adding messages and responses to the JSON resources -- I'm running out of ideas and its already a little repetitive. It's pulling down its configuration from the GitHub repository when it starts up.