Tagtutorial

Quick Saturday hack – the RGB LED push-button

The context

It’s been a long time since my last post and since it’s always difficult to get back at it I will start the year with an easy tutorial.

I’m working on a design in which we have incorporated a big illuminated green push-button, the kind that you see on arcade machines. It is the main UI element of our project. Unfortunately my local hardware store‘s choice in green illuminated push-buttons was limited to really big or really small ones (that it compared to what we had in mind).

They did however have the perfect model, but equipped with a white light. No problem, I thought to myself. I can just take out the LED and replace it with one of my choosing. Going through my LED bin I came across a NeoPixel PCB and realized that it was the exact same diameter as the LED holder of my push-button. An RGB-enabled button was not the original idea but after all, the effort would be the same and the option would be there to be used on the prototype if we needed to test different UI ideas.
Continue reading

Know when to pee with the ATtiny! (badum tss)

This project was born from a very common problem: our office’s floor is equipped with one bathroom that can’t be seen from every desk. Ensues unnecessary back and forth when someone walks to the bathroom only to find it occupied.

The solution ? A simple bathroom monitoring system composed of two devices:

  • An emitter placed on the inside of the door of the bathroom to monitor. An infrared sensor is directed toward the lock’s knob. A piece of black tape is applied on the knob. The idea is the following: when the door is unlocked, the knob’s metallic surface is facing the sensor and reflecting a fair amount of IR light. When the door is locked, the taped part of the knob is now facing the sensor. Since the tape is black, the amount of IR light reflected decreases: we know that the door is locked. We use a radio emitter module to send the value read from the sensor to the receiver. A small Atmel microcontroller (the ATtiny85) acts as the brain of the system. The device runs on 4 AAA batteries and is put to sleep 5 seconds every time a reading is sent in order to save power.
  • The receiver is used to display the status of occupancy of the bathroom remotely. It is built around the same microcontroller as the emitter. A RF receiver picks up the readings from the emitter. Depending on the value received, we light up an RGB LED in green or red. This device runs on a wall wart since the LED is constantly turned on.

Continue reading

L3D Cube visualizations Part 1: real-time scatter plot with Thingspeak

Overview

Basically a demonstration of the plotting capabilities of the cube. We will retrieve some data from a public thingspeak channel (they correspond to
data points posted by a connected barometer installed in my living room).

The JSON returned by the Thingspeak API is parsed on processing and displayed on the cube. Each serie of data is represented by a 2 voxels thick scatter plot.

The client code on the photon is a variation of the main client: we use the accelerometer data to give the ability to change the plot displayed on the front frames of the cube by tilting it one way or another.

Continue reading

L3D Cube visualizations Part 2: real-time worldwide weather

Overview

We will make use of the OpenWeatherMap API to retrieve the temperature from cities around the world and displays the result on the cube. The result is a “real-time” (actually the free API key only gives access to hourly updates) visualization of the earth’s weather.

A Python script is used to select which cities are displayed: we start with a json file provided by OpenWeatherMap that contains every city accessible from the API as well as their ID and coordinates. The json is parsed and casted as a panda dataframe. The latitude and longitude of each city are transformed in voxel coordinates over a sphere of 4 voxel radius. The cities that fall on the same voxel are grouped and a random one is picked up from each group to represent that voxel.

The result is saved in a csv file that is loaded in Processing and used to query the API. The temperatures of each city are then shown on the cube using a gradient of color.

Continue reading

L3D Cube visualizations Part 3: webcam stream projection

Overview

The video stream’s frames are divided into 8×8 squares of equal surface. The average RGB values of every pixel in the square is extracted and used to recompose a smaller image. The image is then projected on to the cube.

With enable3d option set to true, the past 7 frames are stored and displayed on the back frames of the cube with a delay set by the variable updateFrameRate.

The webcam stream could easily be substituted for any video stream if need be.

Continue reading

L3D Cube visualizations Part 4: depth and color projection with the Kinect

Overview

The Kinect is a traditional camera doubled with an Infra Red Camera, enabling it to perceive depth in addition to the color information.

Originally sold for Xbox, it is now available for PCs under the brand Kinect for Windows. Don’t let the name fool you, it will work just as well on OSX or Linux.

Similarly to what we did for the webcam, we connect to the video stream of the Kinect, analyze each frame and downsize them so that they can be displayed on the cube’s 8*8 resolution.

But this time, we will also extract the depth information that the Kinect returns along with the color information of every pixel. In the same way that we averaged the RGB values to recompose a smaller output image, we will compute the average depth of each new pixel. This depth will be used to position the voxels on the z axis of the cube.

Continue reading

The hack-o-lantern project

Prologue

I recently got involved with an organization called Wearhacks.

WearHacks is an international non-profit organization headquartered in Montreal, focused on the promotion of innovation and entrepreneurship in Wearable Technology and Internet of Things all over the world.

They asked me to make a fun and seasonal project intended to be used at the Los Angeles Hacktoberfest event in order to introduce high schoolers to the world of IoT.

The result is – behold – the Hack-o-lantern.


Continue reading

Make an automated tea steeper- with Arduino

What we will be making

I recently got an opportunity to present my first workshop and thought that it could be interesting to share the result. It’s an introduction to Arduino for beginners during which we will be making a automated tea steeper. I chose this project because it provides a good way to introduce basics concepts of embedded programming, from lighting up an LED to dealing with an analog input, controlling a servo motor and keeping track of time, plus it was already very well documented (see the sources).
Continue reading

Make your own data platform for the Internet of Things using Node.js and Express.js

Prologue

I recently wrote a tutorial explaining how to make a connected barometer in which I used Thingspeak as an endpoint for the data. With the current buzz around the Internet of Things, a lot of similar services popped up : Plotly, the Wolframe data drop, Xively and even IBM Cloud to name a few.

What I find problematic with theses services is that you loose control over your data. What are they used for, what happens if the company closes ? You don’t want to lose your preciously collected data.

One solution is to create your own data platform. This way you keep full control over your database. You can set-up backups and are sure that your digital property wont be used for commercial purposes behind your back.

We will thus be making IoT.me, a web application using Node.js as a server, Express.js for the framework and MongoDB as the database (the MEAN stack, without the A).
Continue reading

Make a connected barometer shield for Arduino Uno – using an ESP8266

Prologue

I’ve never really considered connecting my projects to WiFi since the price of the shields was so high. The HUZZAH from Adafruit will set you back $39.95. Sparkfun sells this shield for $84.95. Way to expensive.

So you might imagine my excitement when I first heard about the ESP8266 through hackaday. A WiFi module for less than $5, that sounded ideal. I started to read about it, checking out the projects that flourished around this newcomer. It seemed easy enough to use, and I was already imagining how I would start this article. Something like :

“Meet the great ESP8266, a low cost, plug&play device that will allow you to easily connect your projects to the web”.

But things did not go as planned…The first module I bought was defective, and it almost drove me nuts trying to figure out what was it that I was doing wrong. When I started to think about leaving electronics behind forever and starting a new life as a shepherd in South America, I decided that spending an additional five bucks for a new module just in case mine was broken from the start was not too much.

Continue reading

© 2016 DigitalJunky

Theme by Anders NorénUp ↑