Posts Tagged ‘Lego’
Finishing the RoboGlyphs Project
Just the fun stuff was left for this project! Here is a photo blog montage of the journey to the finish
The first thing to do was to put the black foam backing onto the RoboGlyph. I wasn’t really sure how the glue would look, so I placed a minimal amount on the corners. Next time I do this, I’m going to put glue all over the back since it created a neat effect with the sparkles on the foam. It sort of makes them more sparkly…

Cut the excess foam away with the Xacto knife. Cutting it on a slight inwards angle towards the glyph is much better than a 90 degree cut, I found.

To mount the RoboGlyphs to their board, I used toothpicks on the back. This is what it looks like from the front:

Zoomed in:

The toothpicks fit nicely in the holes of the perf board. I found that if you put glue in the perfboard hole, then put the toothpick in, it will stick better.

They’re all tilted forward because they don’t have a proper footing yet! =)

Again, from the back:

At first I was thinking about using some rubber feet to keep the RoboGlyphs standing, but I didn’t have any on hand. The next best thing: Lego! Plus, there is something else that I can add on to the Lego to make it even more interesting…

The “more interesting” part would be tinfoil! Tinfoil is a conductor, and therefore can have a charge running through it.

It’s quite a difficult task to manage to put the tinfoil onto the Lego bricks. This try was using hot glue. When another brick is placed on this one, the tinfoil splits.

I tried using a simple glue stick, and it actually works much better! The tinfoil does not split when another brick is placed on top of it.

Putting tinfoil inside the brick is much easier.

While the glue is setting for the tinfoil, it’s time to wire up the RoboGlyphs. Thanks to the super simple colour coded wires, the process took a matter of seconds. The Sanguino only has 6 PWM pins, and there are no PWM drivers in my pocket, so the green LEDs will not be controlled by PWM.

Green is probably the best default colour!

Red:

Blue:

The edge lighting is really cool, even though I didn’t really do it very precisely. You can’t really tell from this photograph, though.

The Lego 2x4s were glued on to the bottom of the boards. Then they’re placed onto the tinfoil-coated Lego brick. 5V is applied through an alligator clip!

The other end goes into an Analog In, where the Sanguino checks to see if there’s anything there. If nothing is there… The lights don’t turn on!

There’s a few finishing touches that I have to make. I’d like to connect it to Twitter via Processing, and have it as a permanent setup. I also have to fix the Lego connections, as right now it can only tell if the middle RoboGlyph is disconnected! =)
Friday Night Robotics – MusicBox!
This Friday I had the most awesome idea of a weekend project ever! A 21st century MusicBox, using an Arduino and have blinking LEDs!
I had a Sparkfun box lying around, which is an ideal size for an Arduino and a WaveShield.

I wanted to have LEDs outlining the box, so I went to work on it:


Just as a disclaimer- I designed it wrong, so the LEDs don’t work well. If you’re looking to follow my steps, DON’T DO IT!


Then, installing them into the box:

It looks nice!

Once all of the connections are made, it’s pretty tight in there:

The problem though, is that I designed it so that all the LEDs are in series. Since al LEDs aren’t created equally, some suck up more power and therefore can’t share it with the others. This is what happened:

It’s pretty sad!
But, I think that I can fix it because I soldered the resistors together, not the actual LEDs together.
I was too excited to start this project, so I didn’t bother to plan =) I guess planning would have been better, but it would also have been too boring.
I also worked on a NXT LED blinky thingy. There are these HiTechnic Protoboards that you can get, and basically you attach them to one of the sensor inputs, and you can control power to certain ports and such.
In this case, there’s 6 output pins that you can control. Sounds like an opportunity to use LEDs to me!

This is what the setup looks like:

It goes like this: NXT -> HiTechnic ProtoBoard Sensor Adapter -> 6 LEDs
In order to output instructions to the HiTechnic ProtoBoard, you need ‘drivers’, or headers. They’re located here.
Here is the code for the LEDs, in RobotC:
-
#pragma config(Sensor, S1, HTPB, sensorI2CCustom9V)
-
//*!!Code automatically generated by ‘ROBOTC’ configuration wizard !!*//
-
-
/*
-
Crazy LEDs!
-
Erin K
-
Oct. 9th, 2009
-
*/
-
-
#include "drivers/common.h"
-
#include "drivers/HTPB-driver.h"
-
-
byte theLEDs[] = { 0×01, 0×02, 0×04, 0×08, 0×10, 0×20 };
-
-
task main() {
-
-
// Setup all the digital IO ports as outputs (0xFF)
-
if (!HTPBsetupIO(HTPB, 0xFF)) StopAllTasks();
-
wait1Msec(200);
-
-
while(true) {
-
-
// The delay time
-
int theTime = 50;
-
-
// LEDs going up
-
for(int i=0; i<6; i++) {
-
if (!HTPBwriteIO(HTPB, theLEDs[i])) nxtDisplayTextLine(5, "ERR WRITE");
-
wait1Msec(theTime);
-
}
-
-
// LEDs going down
-
for(int i=5; i>=0; i–) {
-
if (!HTPBwriteIO(HTPB, theLEDs[i])) nxtDisplayTextLine(5, "ERR WRITE");
-
wait1Msec(theTime);
-
}
-
-
alive();
-
-
}
-
-
}
This is what the code does:
To wrap up this Friday Night Robotics, I checked out the Adafruit Ask an Engineer chat. It was pretty cool! I learnt about how LEDs work, and how much it costs to create a Teenyduino! Everyone should check it out, Saturday at 10:00PM EST.
The only things that I didn’t get to do that I wanted to was play with MANOI and the iRobot Create. I’m kinda worried that MANOI’s batteries are drying out as they haven’t been exercised in a while :S EEP!
