Everybody seems to be messing with Arduino lately. So today was my chance to give it a go. Jimmie Rodgers of Willoughby and Baltic helped me set up the software on my laptop at Noise Night. It was incredibly easy, and he helped me to understand that the IDE for the ‘regular Arduinos’ is different for that used on the Minty POV and Brain Machine.
Stephanie, one of my Programming students had a piece of code running on her laptop and wanted to test it with four LEDs. We set up a breadboard with the LEDs, and she got her program to run. She had it going Cylon style, where the light would pass from side to side. After she left, I noticed the breadboard sitting on the table, still hooked up to the arduino, so I figured I would give it a whirl. I plugged it into the USB port, fired up the IDE and saw her program run.
Then I decided I wanted to mess with it on my own, so I did a search for “Hello World Arduino” Hello World is usually the simplest program you can run in a computer language. I wanted simple, so I could understand what it was doing. I found the code, which is also in the Help Menu under something or another, but I couldn’t find it easily. I recalled that Jimmie had told me that Blink is the first program you want to run.
I copied the code and pasted it into the script window. Then I had to figure out how to get it to the board. I hit the Compile window, which looks like a play button, and saw that it compiled. I tried changing a few things, and broke it.
Earlier, Stephanie had some basic problems as well, such as not spelling the variable names exactly the same throughout the code. Hand typed code is case sensitive, so it’s important not to mess with it too much. When we were debugging her code, I put some comment marks ( // ) in front of the lines that were throwing the errors. Eventually, we figured out that the problem was capitalization.
After compiling, I saved the file, and then downloaded it to the board. I was very happy when I saw that one LED blink. After about a half a minute, I got bored, and started messing with the code. I tried changing the duration of the blink and pause, and then I made each of the four LEDs do thier blinky thing.
So now I have made an Arduino blink. There is so much more that can be done, but it all has to start someplace. This step for me has been a major block. For some reason, I haven’t been able to get it going. But now it is going. Hopefully others may find this moment useful. If you do, let us know in the comments. Take some photos and video of your experimentations and add them to the Make Flickr pool.
6 thoughts on “Hello Blink!”
I love the Arduino platform, but what is the value in posting “some new guy discovered how to run somebody else’s blink one LED”. The bootloader comes with the sketch pre-loaded.
Sometimes it’s valuable to know that you can just get started. While I had the arduino hardware for a while, I didn’t realize that there were such specifics as the version of the IDE. Knowing that I needed to go to this page http://www.arduino.cc/en/Main/Software for the download helped get me going. Seeing another person’s code running, where literally the day before she was stumped helped. I showed her the same download link, helped her get it on her machine and she was up and running.
What I see with many systems is that there is all kinds of examples and source on the wickedly amazing and complex projects people have done but often little to find on ‘well, here’s how you get started’.
Maybe it’s different for you, and you can find the basics for every new system you try. But often for me, it is the first steps of the journey that are the toughest to take. Once we can get going, the rest comes easily, more a matter of ‘where do I go from here’, than ‘how do I get this thing to start’
Oracle, I would be glad to hear how you got started, and maybe even tell some of the things that slipped you up. If you are up to telling it, we could all be helped.
Imagine that you are about to do a project in Arduino with 20 9th graders who have never programmed or worked with electronics. Just what problems would you like to anticipate? If one of those kids gets stalled on something basic, how do you keep him from souring the learning experience for the girl next to him? What are the four or five first things that you think people should be able to do with Arduino? How would you organize the experience so that people’s learning and fun would be optimized? What would you tell them before starting? how would you explain semicolons and capitalization? variable names? comments? organizing the flow of the code? whitespace? Or should we just point ’em to the forums and say ‘go figure it out, everybody is doing it’
There are definitely different approaches to helping people learning the value of programming. How would you have liked to be taught?
I got an Arduino for Christmas. I knew I wanted one, and knew there were great things I could do with it, but it was my very first microcontroller and being a newbie to Arduinos (not programming, I have 20+ years experience in that) I also went through the “blink 1 light” and “blink 6 lights in a row”m stages in order to explore ho and build my knowledge.
And while no one in my family could understand my fascination and excitement over getting one, and then six LEDs to flash, it was very thrilling for me to get over that first hump.
Now, if only I could find more documentation on the Arduino programming language and what other fun things I can do.
Comments are closed.