A bit disappointed
Was excited to get my tape in the mail, plugged it in and it worked. Installed PatternPaint and it worked just fine.
Great, now on to why I bought this in the first place. To do some things with it in python.
That's where I've become frustrated, most of the links to documentation on Blinkinlabs are dead with the note of "This document has moved" but to where? No one knows, so I looked for google cached versions. Only to find outdated material and lacking in content.
Fix that!
I'm a bit green to programming, but how do you go about addressing a single LED in python?
Great, now on to why I bought this in the first place. To do some things with it in python.
That's where I've become frustrated, most of the links to documentation on Blinkinlabs are dead with the note of "This document has moved" but to where? No one knows, so I looked for google cached versions. Only to find outdated material and lacking in content.
Fix that!
I'm a bit green to programming, but how do you go about addressing a single LED in python?
Comments
I don't think this project is abandoned, but it would help if someone fixed those links. It's definitely a strange experience for a newcomer.
Are there any other links you've noticed that are missing, besides the ones in http://blinkinlabs.com/blinkytape/docs/?
This should now be fixed. So sorry about that - long story short, the tool that we use to generate the site, "Jekyll" changed the way it interprets links and some stuff effectively got moved around and links were broken.
Sorry about not hopping on this sooner. All of these should be good now:
http://blinkinlabs.com/blinkytape/docs/troubleshooting/
http://blinkinlabs.com/blinkytape/docs/arduino/
http://blinkinlabs.com/blinkytape/docs/processing/
http://blinkinlabs.com/blinkytape/docs/lightpainting/
I also made some changes to the forum so I should get an email when someone posts (which will speed up our response time) but you should also feel free to email me at support@blinkinlabs.com
For almost all of the programming, it's a serial format - so you basically send an rgb value to each LED. In most cases, you'll want to sent 60 in a row - if you're only interested in the first led you'd send one rgb and then 59 sets of 0,0,0 values...etc.
If that doesn't make sense I'd be happy to go into it further with you - look at your code, etc.
But I will share a bit for any other noob (like myself) that finds this helpful.
I came up with a solution that could certainly be tidier, but it worked and was easy for me to understand. What the following accomplishes is it scrapes a minute by minute rain forecasting website, creates a list based on the conditions I set and then sends to the tape. Where every LED represents 2 minutes, if it's going to rain the LED shall be green, if it'll be dry then red. Lets me see in a glance if it's safe to ride my motorcycle.
from BlinkyTape import BlinkyTape
import urllib2
import re
from time import sleep
def clocking(): while True: bb = BlinkyTape('/dev/tty.usbmodem1441') url = 'http://www.accuweather.com/en/us/madison-al/35757/minute-weather-forecast/15532_pc' website = urllib2.urlopen(url) html = website.read() regex = '<span class="time">(.+?)</span>.*<span class="type">(.+?)</span>' pattern = re.compile(regex) clockandprecip = re.findall(pattern,html) wlist = [] for i in clockandprecip: # [::5] limits to every 5 minutes condition = i[1] time = i[0] if condition == 'No Precipitation': rgb = 255,0,0 print rgb wlist.append(rgb) else: rgb = 0,255,0 # green print rgb wlist.append(rgb) for d in range(60): for x in wlist[::2]: # limits to every other minute bb.sendPixel(x[0],x[1],x[2]) bb.show() sleep(1) clocking()
The countdown starts on the USB end (on the right in the photo), so it's dry for 18 minutes and will start raining in 20 minutes. It'll rain for about 34 minutes, and then dry for over an hour.