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

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

Droid 2 Must Have Games

Games kick ass, am I right? Am I right? (****Spoiler…YES!*****)

Since I haven’t blathered about how awesome Android stuff is in a while, I figured I would ramble about games for a while. So far, I have found four games that are pretty much “must-have.” I hate that term, but it gets me search engine traffic. And traffic is a must-have. (Sorry.) You can find these must-havers on Android Market, but you probably knew that. Let’s begin.

In order of most-must-have, to still-must-have-but-not-as-much-as-most-must-have…

Angry Birds — Q. Why so angry, birds? A. Those egg-stealing pigs, that’s why.

mofo

I like that one ^


Robo Defense — Tower defense, FTW. I got really, really sucked into this one, keeping it in the two spot. All acheivements, check.
joke fail

D - Fence...get it (shakes head)


Fruit Ninja — Chopping the shit out of fruit…this game is as fun as it sounds
nacho ninja

Fruit Ninja looks more like Nacho Ninja


Doodle Jump — Pretty sure this (like Angry Birds) made some waves on iStuff. You jump a doodle…it is amusing as hell.
stupid flanders

Stupid Flanders


I’m still waiting for the non-advertisment-laden version of Angry Birds to drop. Right now, the free app is all that is out there on the Android Market. I’m not entirely sure, but I think I spent less than 3 bucks for the other three apps. Robo Defense has a pretty solid trial version, FWIW.

Well, in any regards, get Angry Birds. Meetings at work become little workday vay-kays. Little bird flinging vay-kays.

If you come across anything that I should check out, hit me with a comment. Or, Tweet that crap over to @swantron. Plug.

22 Degrees Solar Halo

I took a spin outside for a brief reading session on my lunch break yesterday. I’m glad I did, as I was treated to a little optical phenominon action…in the form of a 22 Degree Solar Halo. FTW.

I’m posting some pics I snapped…I’ll toss in the full write-up soon.

dang

cool

number 1

inverted

I inverted the colors of that last pic, quite obviously. That will be my template, so to speak, on which to wax nerdy in a Physics-y kind of way. Stay tuned.

Arduino Solar Cell Input

Here we go. As I mentioned a few days ago, I’m horsing around with analog input to my Arduino, in the form of input via a solar cell. For the win. It turns out, that I’m getting far better with my casual electronics experimentation…I will chalk this one up as a win.

My basic set-up is this…Radio Shack solar cell, breadboard, florescent light source, Arduino, and a notebook.

Step 1) gauge light source via multimeter.

test

one point twenty-one gigawatts

1.7 V…no need to toss in a resister, as the Arduino can handle 5V without issue. Good to go.

Step 2) Interface with Arduino via breadboard.

setup

breadless soldierboard

This could have been a direct setup, but for the sake of not soldering a solid lead to my solar cell array, I chose to twist the crap out of the existing + and – leads of the wire outs on the unit, and cram them into the breadboard. USB connected to the Arduino, of course

Step 3) Chop in some code for the Arduino. This was the tricky part…not that tricky, however:

~~code snippet time~~

void setup() {
Serial.begin(9600); }
void loop() {
int v = analogRead(0);
Serial.print(v);
Serial.print(‘ ‘);
delay(900);
}

~~~end code snippet time~~~

enhance

enhance...enhance

Note the lack of comments? I’m a flipping math dude, so that is wholly optional in my book. Long story short, Wiring is a stripped cousin of C++…I have to void setup and loop here, since I am not concerned with anything once I let ‘er rip. I will touch on the programming specifics at a later date, but inquiring minds can find this info quite easily on the Arduino project’s main page, or on Wikipedia. Knock your socks off. I added the delay for sake of real-time monitoring, and matched the baud rate to which I had configured my USB connection. ttyUSB0 would be that in question…9600 would be the rate.

Step 4) Read input via serial monitor.

solar

those figures average out to 'awesome'

As you can see, it is pretty much constant, with some fluctuation due to my set-up. Noisy, yes. Cheap components, yes.

Step 5) Testing ‘zero’ state. Here, I have employed my box of smokes. American Spirit Lights, to be precise.

cigs

Yellow Box of American Spirits...A Labritory Must-Have

Step 6) Gauge system.

Here, I’m altering between ‘on’ and ‘off’ states. I start with the ‘off’ (smokes on solar panel) configuration for a time, remove the box to open the system to ‘max input’ for appx 7 secs, and then place the box to remove the input energy.

for the goddamned win

FOR THE WIN INDEED

Most definitely for the win…with the experimental noise, that could be considered effectively zero. For the win.

In summation, I have read in analog, as intended. Lessons learned? Pretty straight forward I suppose. My cheap-o solar cell is rated for a max of 6V, which I was far under. If I was to use this setup with a stronger light source, I would need to take this into consideration. I didn’t perform any data transformation, as I was not concerned with ‘actual voltage input values’ in this case…merely relative. Most importantly, I was able to knock out the task I had set out to do. Hopefully, I can ride my EE high and get cranking on something awesome, like a netbook robot. With some lasers.