Difference between revisions of "Blog"
(created (old) blog 'revival' so we can decomission the reald [http://blog.ackspace.nl blog]) |
(No difference)
|
Revision as of 11:24, 4 May 2016
We had a blog once. Unfortunately, it was too much work to maintain both a blog and a wiki. The contents of the blog was roughly this:
March 29, 2014
Project: Blog | |
---|---|
Featured: | |
State | Completed |
Members | Everybody |
GitHub | No GitHub project defined. Add your project here. |
Description | |
Picture | |
synopsis
ACKspace moet verhuizen, en wel voor 10 april !
ACKspace is verhuisd!
Het project is daarom ook genaamd 'NACKspace'
Aangezien alle documenten in 1 zucht uit de grond zijn gestampt zonder enige tussenkomst van wie dan ook, zijn de meeste zaken nog 'subject to change', maar in grote lijnen is dit wat 't gaat worden.
projectreferenties
- Ruimtelijk planner: Da Syntax
- Penningmeester: PsychiC
- Secretaris / Logistiek planner: xopr
- Vliegende keep / eerste aanspreekpunt: Vicarious
documenten
old documents
March 1, 2014
Project: Blog | |
---|---|
Featured: | |
State | Completed |
Members | Vicarious, Da Syntax |
GitHub | esp8266-SpaceAPI |
Description | Replace the factory car center console lights with a hackerspace state indicator |
Picture | |
I'm the proud owner of a Citroën C1. For a while I've been wanting to replace the orange lights that are installed in my car's center console. At 30C3 I've been given a short RGB LED strip consisting of 8 individually addressable LEDs (WS2812). (Thanks Matt!) Inspired by videos on YouTube where others replaced their center console lights, I decided to create a hackerspace status indicator in my car.
Requirements
- Raspberry Pi
- Arduino Uno
- Short RGB LED strip
- 12V cigarette lighter USB adapter
- USB WiFi adapter
Step 1: Prepare the Raspberry Pi
- Connect a small USB WiFi adapter to your Raspberry Pi and configure wpa_gui to automatically connect to your smartphone when tethering is enabled.
- Save the following code to a file named spacestate.py
- Note: unless your favorite hackerspace is also ACKspace, you have to replace the URL with the one from your favorite hackerspace. It must point to the SpaceAPI JSON object of your hackerspace. You can find the current list at http://spaceapi.net/directory.json
spacestate.py
#!/usr/bin/env python # coding=utf-8 import json, serial, time, urllib2 ser = serial.Serial('/dev/ttyACM0', 9600) URL = "https://ackspace.nl/spaceAPI/" def get_json(): try: con = urllib2.urlopen(URL) content = con.read() hs_json = json.loads(content.decode('utf8')) return hs_json except IOError: ser.write('b') # print "Network error" except ValueError: ser.write('p') # print "Malformatted json" def print_info(hs_json): if hs_json['open']: ser.write('g') # print "Hackerspace is open" else: ser.write('r') # print "Hackerspace is closed" while 1: jsonret = get_json() try: print_info(jsonret) except: pass time.sleep(30)
Original sample code is taken from [1]
- Make sure that spacestate.py is automatically started when the Raspberry Pi is booting, because we will be running the Raspberry Pi headless in the glove box. I followed the instructions on this blog article to run the python script on boot.
Step 2: Prepare the Arduino Uno
- Follow the instructions on [2] to download and install the Adafruit NeoPixel library.
- Upload the following code to control the RGB LED strip from the Arduino Uno:
spacestate.ino
#include < Adafruit_NeoPixel.h > #define PIN 6 // Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: // NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) // NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) // NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) // NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) Adafruit_NeoPixel strip = Adafruit_NeoPixel(8, PIN, NEO_GRB + NEO_KHZ400); // IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across // pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input // and minimize distance between Arduino and first pixel. Avoid connecting // on a live circuit...if you must, connect GND first. void setup() { strip.begin(); strip.show(); // Initialize all pixels to 'off' Serial.begin(9600); } void loop() { if (Serial.available() > 0) { char incoming = Serial.read(); if (incoming == 'g') { setColor(0, 255, 0); //green } else if(incoming == 'r') { setColor(255, 0, 0); //red } else if(incoming == 'b') { setColor(0, 0, 255); //blue } else if(incoming == 'p') { setColor(255, 0, 255); //purple } Serial.print(incoming); } } void setColor(int r, int g, int b) { for(int i = 0; i < 8; i++) { strip.setPixelColor(i, r, g, b); strip.show(); } }
Original code is taken from [3]
Step 3: Soldering
The RGB LED strip has 3 connections: +5V, DI and GND. Because the short LED strip only has 8 LEDs, it can be powered from the Arduino Uno's 5V directly.
- Find three wires that are long enough to reach the center console from the glovebox, through the dashboard.
- Solder three wires to the three connections on the RGB LED strip: +5V, DI and GND.
Warnings taken from http://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library
Adding a ~470 ohm resistor between your microcontroller's data pin and the data input on the NeoPixels can help prevent spikes on the data line that can damage your first pixel. Please add one between your micro and NeoPixels! We also recommend adding a large capacitor (1000 µF, 6.3V or higher) across the + and – terminals. This prevents the initial onrush of current from damaging the pixels.
Can NeoPixels be powered directly from the Arduino’s 5V pin?
Sometimes. The Arduino can continuously supply only about 500 milliamps to the 5V pin. Each NeoPixel can draw up to 60 milliamps at full brightness. So yes, you can skip the separate DC supply and power directly off the Arduino as long as just a few pixels are used, or more if the colors and overall brightness are low. When in doubt, give the pixels a separate power supply.
- Solder header pins to the other side of the three wires so they will stay plugged in to the Arduino.
Step 4: Installation
- Open the center console with tools and patience.
- Remove the original two small orange light bulbs. Store them somewhere safe in case you want to sell your car in it's original state.
- Pull the three wires from the center console to the glove box.
- Attach the RGB LED strip to the white plastic case with the LEDs pointed towards the white plastic case, otherwise you'll see each individual LED through the translucent center console. I used wide clear tape to attach the RGB LED strip.
- Pull a micro USB cable from the glove box through the hole below the 12V cigarette lighter socket under the center console.
- Attach the USB cable to a 12V cigarette lighter plug - USB adapter. Attach the micro USB to the Raspberry Pi.
- The Arduino will be powered and controlled from the Raspberry Pi, so connect the Arduino Uno to the Raspberry Pi using an USB A-B cable.
- Attach the three wires from the RGB LED strip to the Arduino Uno. (+5V, pin 6, GND).
- Close the center console and the glove box.
- Start your car, after a while the Raspberry Pi will be booted and the spacestate.py will be running in the background as daemon process.
- Keep your eyes on the road while driving, don’t get distracted by your shiny mobile hackerspace space state indicator!
Pics or it didn't happen!
Video with two added animations.. a rainbow pattern and knight rider animation: YouTube video
Location: there is an implementation in Vicarious's car
November 15+16, 2013
Project: Blog | |
---|---|
Featured: | |
State | Completed |
Members | Everybody |
GitHub | No GitHub project defined. Add your project here. |
Description | a.k.a. Project Lasoog |
Picture | |
November 16th 2013
2:15 Finished project Lasoog
Hier de foto’s van project lasoog
November 15th 2013
22:58 LEDjes voor project Lasoog
22:31 Hackers solderen project Lasoog
22:30 3 hacked servervoedingen voor project Lasoog
10:01 LEDstrips, LEDstrips, LEDstrips
Tja, daar gaan we dan met ~100 meter ledstrip awesomeness