Tag Archives: Awesome
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.
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 maxvoid 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 Proof of Concept Vid
As promised, behold the much-anticipated footage of my Arduino AC Interface proof of concept. It was dark in my ‘lab,’ so the footage leaves something to be desired.
So, if anyone is in need of a strobe light, hit me up. I’m all over that.
Stay tuned…I am working on the web-side of the Android dev kit, so hopefully I will have another test coming soon. Ethernet shield, Android, Arduino, and 120V…I’m getting giddy.
Arduino AC Interface
I finally got around to throwing out a little proof of concept with my new toy. I managed to utilize a PowerSwitch Tail to gain control of 120V AC with Arduino…and I did it without electrocuting myself. Not getting electrocuted, FTW.
Long story short, the PowerSwitch Tail is a simple switch. 120V AC in, and either 0V AC out or 120V AC out, with the later being the case when a 5V DC signal is introduced to the unit. Here is what it looks like…
I used some jumper wires I had sitting around “the lab.” You can feed anything into that sucker; speaker wire would throw the switch. Moving on…
Well, it turns out that the Arduino loves to dump 5V signals…like it was made to do so. So, this switch setup is perfect for my microcontroller projects…whatever they may turn out. Anyhow, all you need to do is pick a digital out and ground from the Arduino board, and hooks it up. Hooks it up like this…
One of the best things (most handy?) is that the IDE makes pushing code to the unit quick. Plug a USB cable in, crank out some code, and there you go.
Good news.
It’s MF-ing snippet time!
/*
Relay Switch proof o’ concept
*/// Assign digital pin 12 for chatting
int ledPin = 12;
// Define setup method
void setup() {
// Define pin 12 as output
pinMode(ledPin, OUTPUT);
}// Define loop
void loop()
{
digitalWrite(ledPin, HIGH); // Switch on
delay(406); // wait
digitalWrite(ledPin, LOW); // Switch off
delay(406); // wait
}
That is all there is to it…signal for a while, no signal for a while. 406 is a random value, chosen because I like the 406.
I plugged one of Katie’s lamps into the switch…which was plugged into my “lab” power strip.
Uploaded the code to the controller, and there you have it…
Survey says…
There it is. I shot a video, but YouTube puked during my upload. Not too upset, seeing as how it was just a video of a DIY strobe lamp. The cool part of this lies in the possibilities to extend upon the concept. Throw a web interface in the mix, and you can have a web-controlled lamp. Replace the lamp with something more useful, and you get the point.
EDIT: 1/24
I uploaded the video I snapped to YouTube…here is a hard-link, and I’ll toss the vid in a post shortly. I think I need to enable video embedding, but if you really have a hankering to watch the thing, knock yourself out.
NASA Finds New Life?
Are Pajama Jeans Awesome?
Remember Pajama Jeans? I posted about them a while back, stating that society had hit a new low, due to the sheer level of WTF of which Pajama Jeans reek. Even sexy robot lady can’t make these look less than WTF.
Well, I can’t tell you if people are still making these things. I too can’t tell you if people are still buying or wearing Pajama Jeans.
I can say, with 100% certainty, that people are searching the webs for these retarded things…and en masse. Check the snapshot from Google Webmaster Tools:
Un. Fricking. Believable.
Well, I do get a kick out of the fact the Pajama Jeans would-be shoppers ended up here. I have a feeling they would appreciate the last post about the junk food in my desk drawer at work.
Important Work Items
Awesome Droid Apps Redux
Guess what? I’m posting this via my Droid 2, since Verizon’s 3G is faster than my Bresnan high-speed. Maybe one of their sys admins knocked some servers offline…I bet it is really hard to get around those racks with GIGANTIC CLOWN SHOES. Fuck Bresnan…whatever.
Here is a pic of an angry bird:
I feel your pain, angry bird. I’m picking up what you are angrily putting down. Now to the point of the post. I’m bringin Droid Apps back. You Apple fanboiz don’t know how to act.
Back in the day, I posted a little gem about the Android apps that I deemed must haves. Well, as fate would have it, my title brought me a bit of traffic. SEO FTW. Here is another (hopefully) perfectly titled post, that is dually of value for my fellow Android users.
Here we go…my top 5 Droid apps as of right now.
1) ATK, again. Battery life is still a perpetual issue. Blast your junk processes, and blast them often.
2) Angry Birds. Those birds are angrier than I. Best game I have seen on this damn thing. Bar none.
Tie, 3/4) Nesoid/GameBoid. Emultating the crap out of NES and GBA games. I found a bunch of stuff I used to play when I was a youngster. +1 usage of younster.
5) WiimoteControl. You know what…this will assuredly jump to the number two spot, once I can chop up the code and figure out the motion control aspect. Perhaps number one…who needs a ton of battery life when you can map the crap out of motions and use that as your input scheme I bet ten minutes with that interface combo will sufficiently blow your mind.
Grab one of these phones, root it, and grab those ^ apps. Good times will ensue.
Airsoft Hack Kickoff
I Think I Need Glasses
Really, I need to get some glasses. I’ve been putting it off for a long time…left eye is good, but the right eye is pretty much garbage. Insurance policy comes due in January…going to put it off for another two months. Then, time to get out and grab some sweet spectacles.
Where do you suppose a tech blogger would go to purchase spectacles? I bet a tech blogger would buy glasses online. I wouldn’t know. I spend more time talking about food than technology. But, I can tell you with some certainty I will be buying my glasses online. More precisely, I will buy them at Zenni Optical.
Zenni has revamped their site…looks slick. The glasses were $8.00 per pair…now they are down to flipping $6.95. You could seriously pick up a baker’s dozen of these for less than the price of frames from the stinking mall. Check this out:
The webmaster at Zenni managed to stick that feature on his site. You can select a person’s face, and superimpose any of the glasses from the site onto the top of the image. Looking for some aggressive prescription wrap-arounds? Zenni has the hookup there too, bro.
Old gentleman, you look tubular.
What about gear for the future? Yep…got that too.
Now the old gentleman looks equipped to take on a cyborg. Bring it on. Check out that link up there to see for yourself…that app itself is worth the bump. I’m pretty sure I want some future-ass-goggles. Badly.
















