Skip to content

Beginners Guide to Arduino - free PDF Download

July 30, 2009

Earthshine Design just released a free Beginners Guide to Arduino as PDF download.

Feel free to grab it here: Earthshine Design Arduino Starters Kit Manual.

It covers several experiements you’ll start your Arduino career with, especially you’ve bought thier very complete starter kit. Go for it!

[found via freeduino.de]

RainbowDuino here it is! (and how to program it)

June 25, 2009

rainbowduino2
Yay - I finally got my RainbowDuino. Unluckily I did sth wrong with the external power connection (JST 2 pin jack) and smashed a capacitor. Maybe the polarity was wrong or it couldn’t stand the 12 volts? But luckily no damage to the main system so it still works using the terminal connector (right through the 5volts of the Arduino). *phew*

The first real basic problem I ran into was how to program the Rainbowduino as there’s no USB connector and I don’t have an UART interface.
But well, nothing simpler than that: Just connect your Arduino’s Tx,Rx,GND,Reset and Vcc ports with those of the Rainbowduino, choose the right controller type in your IDE and program it as usual - works perfect for me!

Check out my Rainbowduino Editor mtXcontrol here - it’s an easy way to draw shapes on your rainbowduino!

Btw. DTR on Rainbowduino is Reset on Arduino

UPDATE:
Sorry I forgot to mention, this trick does NOT work if your host arduino is a ATmega168 - you need an ATmega328 to pass serial communication through. Before that, make sure you upload this blank sketch to your host Arduino first:

[code]
/* blank sketch to upload on Arduino */
void setup()
{
}

void loop()
{
}

[/code]

And, as multiple times requested, a picture of my complete setup:
arduino_rainbowduino

Make sure you’ve selected the switch right. It has to point to the same side as the green Terminal connectors are. If you power rainbowduino through the white JST jack, flip it!

MySQL: How to swap entires of two columns with just one query

June 24, 2009

Check this out, I found out a really nice way how to swap values of two columns with just one query, using user defined variables. Given a table with two columns a and b. To swap their values in whole, use this query:

[text]
UPDATE my_table SET a=@tmp:=a, a=b, b=@tmp;
[/text]

Done! Isn’t that easy?

Pimp my TextMate: how to speed up search & load

June 18, 2009

As a true Ruby on Rails developer you probably work with TextMate, as it’s a plain, simple, but yet quite powerful editor. I love its open-file-by-pattern (?+T) or find-in-project (?+?+F) functions. But one thing which bothered me the most was the search time when working on big, large, massive projects. One easy tweak how to speed it up easily is to extend the file and folder exclude patterns. For example you don’t need the tmp, log or vendor folder, nor any binary files within your editor. So I just excluded them, here are my new patterns (all in one line):

Files: (excluded all images,pdf & flash)
[text]
!(/.(?!htaccess)[^/]*|.(png|jpg|pdf|swf)|.(tmproj|o|pyc)|/Icon\r|/svn-commit(.[2-9])?.tmp)$
[/text]

Folders: (exclude tmp tools vendor uploads lang locale po old_migrations script images upload custom_maps log)
[text]
!.*/(.[^/]*|CVS|doc|tmp|tools|vendor|uploads|lang|locale|po|old_migrations|script|images
|upload|custom_maps|log|_darcs|_MTN|{arch}|blib|.*~.nib|.*.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
[/text]

To change the settings go to
[text]
preferences -> advanced -> folder references
[/text]

Yeah, now my search is quite fast again!

RainbowDuino - I'm comming

June 11, 2009

Yeah! Just ordered a bunch of stuff from the Seeedstudio Shop, my new favorite Arduino parts dealer. I’m really looking forward to get the RainbowDuino into my hands. I’ve already order thier 8x8 RGB LED Matrix at ebay which is really promissing… Unfortunately they are located in china to shipping takes ages ;-( More soon to come ….

http://www.youtube.com/watch?v=z_JuFGAYHq0

A short evaluation of open source Newsletter/Mailinglist Software

June 09, 2009

at_sign

A friend of mine asked me which newsletter system to use for sending abt 2k emails abt once a week. I couldn’t immediately respond, so I gave it a small evaluation of current products. As prerequisite, the system should be in active development, run on a (web)server, easy to use (usability over features) and it would be nice to use it at lowcost or for free. This limited the selection a lot and I just want to present my final opinion:

My favorite and ‘winner’ is the NotOneBit.com Simple Mailing List. It’s written in PHP, simple, clean and really easy to use. Perfect for a small use-case like this. Check it out: http://www.notonebit.com/projects/mailing-list/

Actually I thought PHPlistis first choice, but I didn’t liked it usability at all - I wonder why it’s so popular?

OpenEMM has a nice website and pretends to be opensource, but somehow I wasn’t able to get a proper version to run and test. Looks more like fake to me… Update: see comments, apparently there’s lot’s of work going on and you can download it from sourceforge easily..

MailMan is quite popular, known as stable and high performant, but still I don’t like the backend. The whole software looks a bit outdated to me… c’mon it’s 2009!!!

Other systems may worth a look as not for free, so I didn’t test them:
http://www.mailingwork.de/
http://www.supermailer.de/
http://www.campaignmonitor.com/

Nice sources to check:
http://www.inmedias.de/download/Newsletter-Software.pdf
http://www.vwsoft.de/?sectionid=pgminfo&pgmid=3
http://en.wikipedia.org/wiki/Email_marketing_software

Event to be: Art vs. Technology Workshop Berlin

June 08, 2009

Just found this nice event, taking place from 20-21. June in Berlin, organized by the Tinkersoup people:

http://www.tinkersoup.de/workshop/

Unfortunately I may not be able to take part. Damn! ;-(

My first GitHub fork: bounce-email

June 05, 2009

Hurray! I finally forked a github project. Yesterday I ran into the bounce-email gem by Agris Ameriks on Rubyforge. It’s basically a 1:1 port of the PHP Bounce Handler classby Chris Fortune and not very rubyified. Thanks to David Reese, bounce-email is forked on github and I could easily extend it.

I rubyfied the class, did some code cleanup, added (yet a very simple) way to get the original message, and gained some performance by paring message only on demand. A testcase was broken as well the Rakefile, both are fixed. See the update here:
http://github.com/rngtng/bounce-email/tree/master

Arduino: Fade and pulse a LED with just using a DigitalPort

May 17, 2009

This is a nice experiment I did to fade and pulse a LED by just using a digital port. Digital? On/Off, 1/0 - how can this work? Well it does, check this out:

http://www.youtube.com/watch?v=kB62BrQBjTg

The key is, I’m switching the LED on & off very fast which appears the human eye as it’s on all the time (similar to a LED Matrix). Now, I change the time period between switching the LED on and off. Is the off period time longer, the LED lights low, is the off period time short, the LED lights high. Fading the period time, makes the LED pulse… nice!

Check this (still quite ugly) code:
[c]
int ledPin = 13; // LED connected to digital pin 13
int value = LOW; // previous value of the LED
long cnt = 0; // will store last time LED was updated
long low = 0; // interval at which to blink (milliseconds)
long high = 1000; // interval at which to blink (milliseconds)
int op = 3;
long a = 0;

void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}

void loop()
{
a += op;
blinkl( a+30, 10 );
if( a > 200 || a < 0 ) op *= -1;
}

void blinkl(long low, long high )
{
int c = 5;
while ( c > 0 ) {
blink( low, high );
c-=1;
}
}

void blink( long low, long high )
{
long period = 4000;
long pt = period * high / (low + high );
int value = LOW;
digitalWrite(ledPin, value);

while( period > 0 ) {
if (period < pt && value == LOW ) {
value = HIGH;
digitalWrite(ledPin, value);
}
period -= 1;
}
}
[/c]

Ruby Serialport and Arduino - that's easy!

May 14, 2009

Yeah, just controlled my Arduino via the ruby irb console using ruby serialport. Damn easy! (well at least on a Mac, running OS 10.5.7) Hehe, soon more to come…

More to get you started with Arduino and Ruby:
http://www.arduino.cc/playground/Interfacing/Ruby

[update] Mac Os X 10.5.7 is out - all fine except volume control

May 13, 2009

Yeah Mac Os X 10.5.7 just got released. All fine for me, except my external USB soundcard Terratec Aureon 5.1 can’t be volume controlled anymore - strange!? Any idea what’s wrong?

[update - solved!]
Apparently downgrading the USB Sound kernel back to 10.5.6 Version solves the issue. See the comments and the Apple Discussion-board for more… Thx to sonderpop for that hint!

Second try: 2x5 LED Matrix Arduino controlled

April 28, 2009

This time a more sophisticated example. I started to develop an LED Matrix controller and editor in Processing (like every does his first steps on arduino, I think).
By now, you can create a sequence by selecting the LEDs to light up and move over to the next frame. Finished, run it on the Arduino and control the speed - a nice and quick toy way to create any light patterns you can think of easily.

http://www.youtube.com/watch?v=Vmijzo2zT-s

More examples and source code soon to come…

My first Arduion test: 10 LEDs running light

April 24, 2009

Check this out:
http://www.youtube.com/watch?v=irVW4U8zq_k

That my first proper Arduino test, controlling a 10 LED running light. I attached a small button via interrupt as well to start & stop the light. More to come soon, stay tuned!

Here the (very,very ugly) source code:

[c]
int ledPin = 3; // First LED connected to digital pin 13
volatile int stop = LOW;

void setup()
{
Serial.begin(38400);
for( int i = 0; i < 10; i++) {
pinMode(ledPin + i, OUTPUT);
}
attachInterrupt(0, stopit, RISING); //Button attached to Pin 2
}

int i = 0;
void loop()
{
for( i = 0; i < 7 && !stop; i++) {
blink(ledPin + i);
}
for( i; i >= 1 && !stop; i–) {
blink(ledPin + i);
}
for( i = 0; i < 10 && !stop; i++) {
blink(ledPin + i);
}
for( i; i >= 3 && !stop; i–) {
blink(ledPin + i);
}
for( i; i < 10 && !stop; i++) {
blink(ledPin + i);
}
for( i = 9; i >= 1 && !stop; i–) {
blink(ledPin + i);
}
}

void stopit()
{
delayMicroseconds(1000);
stop = !stop;
}

void blink( int pin ) {
digitalWrite(pin, HIGH);
delay(120 - abs( pin - 8 ) * 20);
digitalWrite(pin, LOW);
}
[/c]

Arduion has arrived

April 17, 2009


Here it is! Yeah, finally my Arduino (ordered at Watterott) has been delivered. Can’t wait to get my hands on it. Stay tuned for future reports!

All about this great ‘toy’ here: www.arduino.cc

I want to have an Arduino - now!

April 07, 2009

http://www.youtube.com/watch?v=PeScmRwzQho

www.arduino.cc now!