Start out by installing the tools (Fedora 14 and up) using the package manager (see a somewhat dated how-to on the Arduino site):
yum -y install arduino uisp avr-libc avr-gcc-c++ rxtx avrdude
As noted in the how-to, a minimal install would just be the
arduino
package.![]() |
Blink Sketch |
The first "hello world" type of thing in the Arduino Cookbook is to plug in your Arduino and load the Blink Sketch ("sketch" is what a bit of Arduino code is called, like a script in other languages). Before the sketch can be uploaded, it needs to be compiled. To compile a sketch just requires clicking the button with a triangle inside on the upper left of the IDE window (it looks like a play button). This should result in a message like "
Done compiling
," and "Binary sketch size: 1024 bytes (of a 32256 byte maximum)
." The next step is to make sure the correct board is selected. In my case it is an Uno, the first menu entry under
Tools --> Board
. Then the correct serial port must be selected under Tools --> Serial Port
. In my case it was the first one. Now clicking the Upload
button sends the compiled sketch to the Arduino Uno. You should see the TX
and RX
LEDs on the board flash, and then the L
LED will flash according to the settings in the sketch. That's it: if you've followed along, then you've just programmed an Arduino!
I just got my first Arduino for Christmas, the Uno. I want to come in some time with some of our experts and due a little more than blink. I got mine setup in Ubuntu 64 bit and what an exciting moment it was. http://megaman86.dyndns.org
ReplyDeleteVery nice. I got mine for Christmas too.
ReplyDeleteLiz and Joe have been coming in on Monday evenings when some of the rest of us are in there working on the next iteration of the furnace/kiln to work on their Arduino+WavShield+Button for the Boonshoft. I bet they'd be glad to offer pointers.
Maybe we should add a "come play with your Arduino" to the meetup? It could be Monday or some other day if that's more convenient for folks.
Well, Sean and I were having a great time at the space blinking LEDs and whatnot, until I nearly bricked my little board (turns out to be a well known problem on Linux [1]). Fix following the instructions on the Arduino site [2].
ReplyDeleteDownload the usbserial hex file for your board, make sure it is the 'raw' file, not the html [5]. Install 'dfu-programmer'. Bring the reset pin low (ground it, see picture [2]). Execute the following commands.
[dude@box ]# dfu-programmer at90usb82 erase
[dude@box ]# dfu-programmer at90usb82 flash Arduino-usbserial-uno.hex
[dude@box]# dfu-programmer at90usb82 reset
Unplug the board, then plug it back in. Should be fixed.
# References #
[1] http://www.hacktronics.com/Tutorials/arduino-uno-linux-serial-port-printing-trouble.html
[2] http://arduino.cc/en/Hacking/DFUProgramming8U2
[3] http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295240179
[4] http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286088093/34
[5] http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286088093/34
I played around with a WYSIWYG editor called Ardublock (http://blog.ardublock.com/) as well as looked on sparkfun for some ideas, like possibly purchasing an ethernet shield[1] as well as a passive ethernet poe adapter[2] along with a BAC sensor to build a website that can track drunkenness perhaps... haha.
ReplyDelete[1]http://www.sparkfun.com/products/9026
[2]http://www.sparkfun.com/products/10759
http://www.sparkfun.com/products/298
[3]http://www.sparkfun.com/products/8880