It’s Seeed tradition to organize Hackathons within thecompany every month. And in the previous Hackathons, it’s usually teamed up by the engineers in our RnD team, and then other colleagues without engineering backgrounds will join the team to build projects together! And this hackathon, the Episode #1, Season #1 of Seeed Hackathon 2018 has been different: this time, we don’t have engineers in the team! To be honest, it was a bit scary to build a hardware project without any engineers in the team to lead. However, we nailed it!
Since some Seeed colleagues just moved into the new office,which is above Chaihuo x.factory (the maker space created by Seeed Studio), thetheme of this episode of this Hakathon is “Hacking the Office”. For our team, we would like to create an interactive project to play with, adding some juice to the office life! And we came across this project of “Makey Makey Monome” on Instructables, which we love so much and we decided to make similar version of it.
Here comes the step-by-step instruction:
Parts List:
Hardware
1. Seeeduino v4.2
2. 16 alligator clips
3. Digital RGB LED Flexi-Strip 60 LED *2
4. Proto Board
5. copper tape (double-sided conductive - 6mm x30m)
6. stranded 22 gauge wire
7. 5V power supply
8. power adapter
9. 4.7MΩ resistor
10. jumpers
11. 22square inch acrylic board
12. 26inches long wood panel
Software: Arduino IDE
Adobe Illustrator
Tools
1. Laser Cutter
2. soldering iron + solder
3. wire strippers
4. wire cutters
5. scissors
6. measuring tape
7. straight-edge
Step 1: Cut the LED strip & Solder the LEDs together
(1) Cut the LED trips
Cut the LED strip into pieces. We need 64 pieces to make a8*8 matrix. Cut along the lines of each LED, make sure both ends of the LEDhave the solder pad for soldering in the next step.
(2) Cut the Wires into 5.5cm pieces. We need 3 differentcolors: red for 5V, white for data and black for ground. Use wire stripper tostrip both ends of the wires, preparing for soldering.
(3) Solder the LEDs together. Please make sure that it’s solder to the right pads and in the right direction, or the circuit won’t work and the LED won’t light up. There are three pads on each end of the LED, one marked as 5V, and one D0, and one GND, representing 5V power input, data and ground respectively.
Note: We need to put 1 single LED in each cube of theLattice. And our LED strip is 1 meter with 60 LEDs. That’s why we need to cutit into each pieces and re-solder them together. And here comes our first tip: There are some LED strips that has similar RGB LEDs with larger distance between each LED. Choosing this kind of LED strip will save us a lot of time and trouble from soldering.
Since no one in our team is skilled at soldering, it was quite troublesome for us to solder all these 64 LEDs together. Luckily, we’ve got our colleague Dwin, a skilled technician to come and help us finish half of the soldering tasks.
(4) Solder the power cable to one end of the LED strip.
I found a cable in the warehouse of x.factory. Cut it, tookout the 2 wires within the cable, stripped the rubber part of each wire andthen solder one end to the 5V pad, and one end to the GND pad of the LED strip.
(5) Testing the LEDs After getting 2 strips of re-soldered 32-LED strips, we need to test whether it worked or not. And there were a few mistakes, some were short circuited, and some were soldered to the wrong pads. We had to re-solder the wrong locations.
Step 2: Make the Lattice
(1) Design the Lattice
Our designer CY designed lattice with Adobe Illustrator
(2) Cut the columns and rows
We used our laser cutter to cut the wood into 18 strips (9strips of them will be used as rows, and the other 9 will be used as columns)
(3) Assemble to make the lattice
After getting the 18 strips, assemble them into the latticeas the followings. Please remember to put another piece of wood under the latticeas the base.
(4) Mark the position of the LEDs
After getting the lattice, we use a pen to pinpoint thecenter of each cube to mark the position of the LED in each cube.
(5) Stick the LEDs onto the base wood
On the back of each LED is the tape that allows the LED tostick onto the base wood. We stick the LEDs onto the base wood (each LED at themarked position).
(6) Put the assembled lattice onto the base wood.
Step 3: Programming
Just liked mentioned earlier, we didn’t have any team member as an engineer and it took us quite a while to tackle the programing task as well. We tried Makey Makey. However it didn’t work. There were problems in the connection of the cable, and then when it was finally connected, the code that Jdeboi provided just didn’t work on our Makey Makey. After trying many different times and spent a lot of time debugging, we gave up the Makey Makey version, and came up with a solution of using Seeeduino V4.2.
(1) We connect one 32-LED strip with Seeeduino V4.2, and test the effect of the LED and the lattice. It worked! This gave us a huge confidence for finishing the whole project!
(2) We didn’t use the version of the LED connection as Jdeboi’s connection. We finally decided to connect the two 32-LED strips together. However, this connection also makes the sequence of LED a bit complex. See the followings:
(1) Testto see whether all the LEDs will light up.
It worked! And the whole team hoorayed so loudly, there wereeven echoes within x.factory!
The colors are very beautiful, some people even suggested that we can make advertisements for cosmetics company, especially for blusher products.
(2) Make it Interactive – design a “Makey Makey”
This small triumph was very encouraging. However, we won’t stop here. We want to make it interactive. We use a protoboard to make a simple “Makey Makey”. Please see the picture below.
(3) Make it Interactive – connect “Makey Makey” with Seeeduino, program to make it interactive
For the source code, please refer to the followings. Please note that the number of LEDs are defined according to our LED sequence【see above in Step 3 – (2). If your LED sequence is different, please make sure you change the code accordingly】
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include<avr/power.h>
#endif
#define PIN 5
#define NUM_LEDS 64
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN,NEO_GRB + NEO_KHZ800);
uint8_t theLastLED = 0;
const uint8_t LineList[8] = { 2, 3, 4, 6, 7,8, 9,10};
const uint8_t RowList[8] = {11,12,A0,A1,A2,A3,A4,A5};
static uint8_t ledST[64] = {0};
void setup() {
// put your setupcode here, to run once:
pinMode(LED_BUILTIN,OUTPUT);
for(uint8_t i = 0;i<8; i++){
pinMode(LineList[i],INPUT);
pinMode(RowList[i], INPUT);
}
strip.begin();
// strip.setPixelColor(0, 0x2020d0);
strip.show(); //Initialize all pixels to 'off'
Serial.begin(115200);
}
void loop() {
// put your maincode here, to run repeatedly:
uint8_t touchKey;
touchKey =getCrossNum();
// lightOn(touchKey);
// lightKeep(random(64));
lightKeep(touchKey);
}
void testAllPin(){
uint8_t lineVal = 0,rowVal = 0;
for(uint8_t i = 0;i<8; i++){
if(digitalRead(LineList[i]) == LOW){
lineVal +=1;
}
if(digitalRead(RowList[i]) == LOW){
rowVal +=1;
}
}
if((lineVal +rowVal) > 0) digitalWrite(LED_BUILTIN, HIGH);
elsedigitalWrite(LED_BUILTIN, LOW);
}
/***
* 0xff: means no cross have been touched
* 0~63 means which have been touched
***/
uint8_t getCrossNum(){
uint8_t retval =0xff;
uint8_t lineVal =0xff, rowVal = 0xff;
for(uint8_t i = 0;i<8; i++){
if(digitalRead(LineList[i]) == LOW){
lineVal = i;
break;
}
}
if(lineVal < 8){
for(uint8_t j = 0;j<8; j++){
if(digitalRead(RowList[j]) == LOW){
rowVal = j;
break;
}
}
}
if(rowVal < 8){
if(lineVal %2 ==0){
retval = rowVal+ (8 * lineVal);
}
else{
retval = (7 -rowVal) + (8 * lineVal);
}
}
else retval = 0xff;
delay(100);
return retval;
}
/***
* 0xff: means no cross have been touched
* 0~63 means which have been touched
***/
void lightOn(uint8_t num)
{
if(num ==theLastLED) return;
if(num < 64 ){
strip.setPixelColor(num, 0x2020d0);
strip.show();
theLastLED = num;
}
else{
strip.setPixelColor(theLastLED, 0);
strip.show();
theLastLED = 0xff;
}
}
/***
* 0xff: means no cross have been touched
* 0~63 means which have been touched
***/
void lightKeep(uint8_t num){
static uint8_tlastNum = 0xff;
if(num >= 64)return;
if(num == lastNum)return;
lastNum = num;
if(ledST[num] != 0){
ledST[num] = 0;
strip.setPixelColor(num, 0);
strip.show();
}
else{
ledST[num] = 1;
uint8_t color[3] ={0x00};
uint32_t RGB =0x000000;
color[0] =uint8_t(random(256));
color[1] =uint8_t(random(256));
color[2] =uint8_t(random(256));
RGB =color[0]+(color[1]<<8)+(color[2]<<16);
strip.setPixelColor(num, RGB);
strip.show();
Serial.println(num);
}
}
In this process, we noticed that there were some blemishes, one of which was the delays in LED lighting up; and another was that LEDs where flashing when it lights up. So we modified the code to make it work better.
For the programming part, we owe a huge gratitude to JohnHenry, a maker pro member at Chaihuo x.factory. He helped us with designing the“Makey Makey” with Proto Board writing codes.
Voila!! Here it comes, the complete, and functional versionof our interactive color matrix.
Yes, we still need to improve the enclosure of this project and make it more beautiful. And who knows, we might have a different version of this project, stay tuned!
The proud and excited team behind this project: CY, Designer
Dandan Li, Sales Manager
Lily Li, PR Manager
Molly Li, Marketing Manager
Shuyang Zhou, Sales Consultant
Violet Su, Community Manager
A kowtow to our lovely mentor and consultant:
Dwin Yang, PCB Layout Engineer
John Henry, Maker Pro, member at Chaihuo x.factory
We’d like to thank Jdeboi for inspiring us to make this project! If you like this project, welcome to make one (maybe different version) by yourself! Welcome to share with us! Feel free to give us comments if you have any questions. Last but not the least, click the button “RespectProject”, which is not just a part of our completion (:D) but also helps encourages more non-engineers to join the world of making.
Comments