Evolution of a Project

I have two speeds when it comes to projects: percolate and bazooka. Whereas my swantron comment / to / LCD project was bazooka, this Twitter deal has been percolate. Haven’t been able to jump in completely, rather, I have been poking this one with a stick.

Still poking…

arduino controlling blue lcd

dual terminals and a terminal

Making progress…snagging my Twitter page via Python, and dumping it to LCD:

body and html closing tags on my lcd

+1 closing tags

I just need to hammer out some parsing, and I will be good to go. I really need to figure out some sweet regex and drop this whole ‘import (some junk)’ stuff. Who knows…at this rate, I just may.

Command Line LCD Arduino Interface

Liquid crystal displays are pretty awesome. Command line interfaces are very awesome. Hmm…

I started daydreaming at work about how to go about making hardware interface with an RSS feed. I have seen some projects that use Arduinos with ethernet shields to check Twitter, for example, but they seem unnecessarily bulky. Or clumsy. I spend a lot of time working on the command line, and love to put together dirty little scripts to solve problems. It sort of goes along the lines of ‘when you have a hammer, everything looks like a nail’…I figured that the same thing could be implemented with a little shell scripting and my trusty Arduino, sans anything complicated.

So far, so good.

bad lab mobile

bad lab mobile

I put together a sketch (after the bump) to drive my LCD, writing serial output to the screen. After verifying that the sketch worked via the Arduino IDE’s serial monitor, I popped open a CLI and got to work. FWIW, I am using Ubuntu 11.04 still…ctrl-alt-t pops open a terminal window…unity has me all over shortcuts these days. Anyhow, I was able to verify that I could echo text and direct it to the USB port that the Arduino was mounted to. No sweat.

As a proof of concept, I decided to display the number of times that I had the word “awesome” on swantron.com. Once the LCD was shown to work, the sky is the limit…see some regex, pipes, wget, and so forth in action:

CLI

CLI FTW

Survey says:

+1 awesome

+11 awesome

Eleven “awesome”s. Awesome.
(Hit the bump for some code, an oddity, and more fun…)
Continue reading

Easy LCD Arduino Display

I am tired of looking at wobbly windows full of Eclipse. The best and worst part of the IOIO board is the fact that the libraries are Java-centric…unfortunately, I am in the middle of a ‘worst’ phase. I am sort of stalemated. Unfortunately, my issue lies in something that should be trivial, namely naming. Once I can figure out how to orient the crap out of these object-ass pins, I will be good to go. Until then…I am going back to the basics. Processing looks so safe and warm. Coziness, for the win.

How about a 20 by 4 LCD project? Okay.

easy blue LCD arduino +1 easy

+1 blue

I have had this sitting on the workbench of bad lab for a while. Time to get after it.

The unit came assembled, minus the jumpers I needed to plug this into my breadboard for prototyping. Coincidentally, my soldering station needed to come out of retirement. Sixteen pins…sounds about perfect.

(hit the bump for several more pics, a snippet, and some other awesome stuff) Continue reading

DIY Minority Report

Spoiler1: This is awesome.
Spoiler2: I’ve never seen Minority Report.

I do know that there is some sort of hands free interface, and that is what I have put together.

minority report

+1 dizzy

Long story short, I have extended upon my PING))) project to include some sweet touchless home automation. I have the ultrasonic sensor interfacing with my garage door and a lamp, utilizing a servo and a PowerSwitch Tail, respectively.

Hit the bump for an awesome video of this thing in action, and for my spippet.

Continue reading

Garage Door Hack

Introducing Open-er-o-matic 3000. OOM3K. My finest project to date. I have my Arduino poking around with a PING))) sensor, a servo, some LEDs, and best of all…my garage door opener. End result: some Star Trek-ass shit.

hit the vid

Ronco alert

Check this footage of the OOM3K in action. Here, I had it configured to open the door when the ultrasonic sensor echoes off of something within 8 cm…

After the bump, of course

Continue reading

Ultrasonic Distance Sensing

I really should have a running list of these mini-projects I have been cranking out. This one: using a PING))) sensor from Parallax Inc to drive LEDs for a set of values. Sounds boring, but it is sort of cool. Oh cool.

Picture time:

doing work at work, again

doing work at work, again

Follow the bump for a vid / snippet
Continue reading

Arduino Servo Fan Control

Before you try to dr this, I have included a video to combat the tl crowd. You’re quite welcome. See below.

Now I’ll explain. I may even toss in a snippet…who knows.

Basically, I found myself with a few free hours, an Arduino, a bunch of random components in my lab (read: garage) at my disposal, and no real plan of attack. Result? Arduino/servo motor controlled fan.

Jump off component…silver spray painted Altoids can. Nice…chop that sucker up so I can smash a servo motor in there.

minty

+1 minty

Well done. See…

works well

dang, son

Lady Ada uses these for some random projects. If you can stomach a whole bunch of crappy mints, you have a nice little Arduino-sized metal casing. Of course, it poses a grounding threat, which I experienced working with my motor shield a while back. That said…keep a few around. I have put this one to use before.

Next step…testing the servo

wires

wires for the win

For this, I broke out my motor shield. It doesn’t have any features that would benefit this project…the servo areas are basically just power, ground, and control. Control pumps into the 16B 10 port, like a jumper…that works for my debug.

Next, implement a fan.

big fan

I'm a big fan.

I snagged this fan from an old tower, I think. I really don’t know. It seemed to react well to a 9V battery, so I tried it with a 5V source…same deal. Awesome. I used a zip tie to fasten this to that, that being the Altoids enclosure.

This thing needs a base…man-clamp to the rescue:

secured

man-clamp

I picked this up, to use it as a soldering base. That ‘x-tra’ hands piece of shit that I have previously posted in pictures didn’t cut it. This is the manly version. And, it works great for this project, I believe…you can decide based upon the vid. Here is what it looks like, with some more detail.

fan

clamp in action

Let’s add some code…oh no…sounds like we’ve reached the BALLIN ASS SNIPPET ZONE

#include

Servo myservo; // servo opbect

int pos = 0; // initialize

void setup()
{
myservo.attach(10); // digi pin 10

void loop()
{
for(pos = 0; pos < 180; pos += 1) // from 1 to 180 { myservo.write(pos); // moves servo delay(20); // waits 20 ms } for(pos = 180; pos>=1; pos-=1) // sweeps span between 180 and 1
{
myservo.write(pos); // moves servo
delay(20); // waits 20 ms
}
}

If that looks familiar, it is because it pretty much the sweep example from the Arduino IDE. No changes necessary…I like when that happens.

Here is the final product:

fan

I'm a big fan of this little fan. Sorry.

Not bad, for a quick slam-together exercise. It isn’t really robotic, since it has no sensors. I could bump this up a notch with some IR LEDs, or my PIR sensor, but that is for another time.

Blah blah blah, stay tuned, blah blah. Until then.

Arduino Solar Cell Night Light Concept

So, I’ve formalized the solar cell project I have been poking at for a while. I managed to clean up my code and mess with some initial conditions, etc., and now have a fairly solid proof of concept for a solar cell-centered night light.

lighty

you may want to ramp up that LED a bit

As was the case in my first few runs, my sketch incorporates a five second initialization phase. This acts to set both relative minimum and maximum values which act to provide “full light on” and “full light off” values, respectively. The generated power from the solar cell is read in to the Arduino via analog input, and the LEDs are driven via digital outs. The rest is some simple math that transforms the range of the analog signal into a digital range of zero to two hundo fifty five.

It’s giant-ass-text-having snippet time!

// Solar LED IO
// Joseph Swanson | http://swantron.com
// 2011

// Define constants
const int sensorPin = A3; // Solar cell Pin
const int ledPin = 5; // varuiable LED Pin

// Define variables
int sensorValue = 0; // wipe read value
int sensorMin = 0; // set initial min
int sensorMax = 1023; // set initial max

void setup() {

// turn on Pin 11 LED…indicates calibration period begin
pinMode(11, OUTPUT);
digitalWrite(11, HIGH);

// stay lit for five seconds
while (millis() < 5000) { sensorValue = analogRead(sensorPin); // adjust for real max if (sensorValue < sensorMax) { sensorMax = sensorValue; } // adjust for real min if (sensorValue > sensorMin) {
sensorMin = sensorValue;
}
}

// end Pin 11… calibration period finito
digitalWrite(11, LOW);
}

void loop() {
// read the solar cell analog
sensorValue = analogRead(sensorPin);

// apply a little calibration to the sensor reading
// bit from example sketch at http://arduino.cc
sensorValue = map(sensorValue, sensorMin, sensorMax, 0, 255);

// set constraint for outliers with respect to min/max
sensorValue = constrain(sensorValue, 0, 255);

// fade the LED from one to 255
analogWrite(ledPin, sensorValue);
}

Pretty straight forward. On to the vid…


It’s web2.0-too-many-script-ass-calling embedded video time!

Not too bad. Again, I used an Arduino Duemilanove and a Solar World panel. I might try to further this concept by incorporating my 120V switch and getting a lamp up in here. Stay tuned, as always.

Arduino Solar Cell-Based Detector

*Proof of Concept Warning*-*Proof of Concept Warning*-*Proof of Concept Warning*

Mission: Utilize a solar cell to vary the intensity of an LED

Supplies: Arduino Duemilanove <--> USB <--> Notebook (Linux, por supuesto)
Breadboard, Jumper Wires, Make-shift Jumper Wires (spare resisters), LEDs, Solar Cell

Setup: Here it is

work at work

I herd you like to work, I set you up so you can work at work

The setup is pretty straight forward: Read analog, write digital. The primary hurdle was figuring out the initialization step. Basically, I needed to provide a time-frame where you can read in minimum / maximum values from the cell. The LEDs in the awesome video below show the results… v

This project is full of take-off ideas. Reverse the range on the LED outputs, and you have a setup that powers up a light as the ambient light levels fall. Motion detector…you bet. You could implement a setup to run the initialization cycle at intervals, to provide a real-time average light level, and check for a delta of some size. Boom. There you go.

I’ll clean up the code, use some real jumpers, horse around with things in general, and throw up a post. With a snippet. Check back.