Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts

Saturday, December 17, 2011

Autonomous, Rebelling, and Twittering Cheeriobot


Cheeriobot normally quietly follows CHEERLIGHTS and happily changes its colors. But, Cheeriobot can tweet, and thereby lead the worldwide cheerlights. Cheeriobot can also become rebellious.

Finally, the software worked and I got Cheeriobot to tweet to @cheerlights to change its own color, as well as the colors of others worldwide!

With the Cheerlights project, anyone can tweet a color request to @cheerlights and all cheerlights worldwide change their color to that same color. Anyone? Yes! Even an Arduino with an ethernet shield that is programmed to tweet when it "runs out of patience".

Many people have hooked up their own holiday lights to this twitter feed, and change their colors in sync with the rest of the world. This works through microcontrollers that can read websites through ethernet.

I called my version of the cheerlights controller the "Cheeriobot" and gave it a few extra capabilities:

- It runs out of patience if the same color came on for too long
- It then tweets a new color request to @cheerlights
- My Cheeriobot can be in "Rebel" or "Follower" mode


In Follower mode, all is good, and Cheeriobot cheerily follows the worldwide color like a good citizen would. In Rebel mode, Cheeriobot will deliberately be out of sync with everyone else. If they say green, Cheeriobot goes red!

See video below for a quick demo of the functionality. You will also see that I'm not good at explaining stuff. I'm also not a video producer or sales and marketing guy. But I think you get the point.

If you want to make your own tweeting and rebelling cheerlight following robot, email me or stay tuned. I will post the code in support of open source as soon as I get to it.

Happy Holidays!
Axel

PS: Contact Cheeriobot through twitter. Tweet to @cheeriobot.




Sunday, December 11, 2011

Delay


I pinpointed the issue to the use of an additional library that I added to the original CHEERLIGHTS sketch found here. It interferes with the recognition of the color string and feeds back NO MATCHes. Need more time to investigate. I had removed the GE light library and addressed the LEDs through individual pins and with RGB codes. Will post the Arduino sketch once it works.

Shoutout to the folks at CHEERLIGHTS


The folks over at CHEERLIGHTS have mentioned my blog and my hack in a recent post. Big shoutout to them and thanks for getting the CHEERLIGHTS project off the ground. I'm enthusiastic about being a part of it and about presenting my latest updates. I hope to get it out tonight.
I seem to have issues with reading out the correct color and get a NO MATCH a few too many times. Not sure, but I think it's a clash of libraries. Still investigating this. Also need to solder up a few hardware bits and get a few more lines coded. Stay tuned!

Question to the CHEERLIGHTS folks, is it possible to get blocked from your twitter account or do you let everyone just tweet at their hearts' content and change colors by the minute if they want?

CHEERLIGHTS


I'm hooked up to the CHEERLIGHTS now. I totally cheaped out on the GE lights ($75) and the ioBridge ($120) and initially went with only a single RGB LED ($1.95) and the Arduino Ethernet Shield ($45). It took me a while to figure all this out but it works now. Expect some tutorials over the next few days.

If you don't know what the cheerlights are, check out their website. Essentially the project connects Christmas lights all over the world through the internet. The lights are changing color all over the world, at the exact same time, and anyone with a twitter account (YOU!?) can change the colors. Worldwide. Just tweet your desired color to @cheerlights.

Saturday, October 1, 2011

using two pots to influence led behavior

i wanted to try something independent from the given examples and came up with the following (trying to understand that everything is a building block). so i wanted one physical input that controls the time my led is on. and one physical input that controls the time my led is off. my two rotary potentiometers served me well for this. in order to see on my computer screen what values the pots return, i plotted their values into the serial monitor. i can now run the sketch on the arduino and adjust the frequency and on-vs-off-time-ratio with the two pots. see movie below to see what i mean.


Here's the code:

int sensorPin1 = A0; // select the input pin for the potentiometer one
int sensorPin2 = A1; // select the input pin for the potentiometer two
int ledPin = 9; // select the pin for the LED
int sensorValue1 = 0; // variable to store the value coming from pot1
int sensorValue2 = 0; // variable to store the value coming from pot2

void setup() {
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT:
Serial.begin(9600); // start serial com to monitor values visually as i change pots

}

void loop() {
// read the value from the sensors:
sensorValue1 = analogRead(sensorPin1);
sensorValue2 = analogRead(sensorPin2);
// turn the ledPin on as per value of pot1
digitalWrite(ledPin, HIGH);
// stop the program for
milliseconds:
delay(sensorValue1);
// turn the ledPin off as per vaalue of pot2:
digitalWrite(ledPin, LOW);
delay(sensorValue2);

Serial.println(sensorValue1); // output the value to see what it is in the monitor
Serial.println(sensorValue2); // output the value to see what it is in the monitor
}


it took me a while to realize this, and it was an eye opener:
- your inputs and outputs are not physically connected, just through the software
- the code is a bit confusing because it uses variables to camouflage what it's doing kind of
- the two blue pots send their signal as a voltage input to the program (follow red arrow)
- the outputs send the corresponding information to the led as an output (follow green arrow)
- in reality, the code runs on the arduino, not on your pc (so the arrows stay on the board), but it's easy to visualize it that way



Friday, September 23, 2011

arduino arrived


WAIT, WHAT HAPPENED?
so i got the arduino in the mail today. went with the inventor's kit from sparkfun. $95. this one.

WHY DID I GET AN ARDUINO?
i had a few ideas in mind for a while and never knew how to make the connection between the "map" i have in mind and the real world. i knew what my - let's call it project - needed to do from an end-user perspective, but how the heck put this into reality? the arduino makes that bridge. it's the missing interface.

WHERE DID I HEAR ABOUT ARDUINO?
i first heard about it here, in a chaos computer club express podcast. it's about tinkering in the 21st century and how to spread out knowledge about how products really work. i googled arduino and first didn't know what to do with it. went back to that site a few months later. started to get really interested in it. finally understood it's meaning for me (i have some basic c++ knowledge, know how to use a computer, know how to bend metal and use a file, or saw, or a soldering iron, like anything r/c, have some product/project ideas, etc) and decided to order it.

WHY THE HECK ARE YOU BLOGGING ABOUT IT?
since arduino is open source, i thought i'd be a good citizen and report back what i learned, try to inspire others with what i do, and share my code. at this point, i'm learning to crawl, so don't expect too much. i have big plans though. lol.

WHY DID YOU CALL IT "THE MISSING LINK - ARDUINO BLOG 2890001"?
i did a google blog search and that turned up two million eight hundred ninety thousand results. i added one. which makes my arduino blog arduino blog two million eight hundred ninety thousand and one. i even have a screen grab to prove it.


OH, AND BY THE WAY...
i just spent two hours on photoshop extracting the red and green crossed leds from their background, so i will make that my signature logo. like how? like so:


welcome to the site.