Hi All,
Is there a resource anywhere which has detailed step by step instructions for programming an Arduino in straight C?
Thanks,
Seanlabs
Hi All,
Is there a resource anywhere which has detailed step by step instructions for programming an Arduino in straight C?
Thanks,
Seanlabs
You can try the "Smiley's Workshop" tutorials at http://www.smileymicros.com
Assuming you mean "using the free gcc compiler for AVRs"; instructions would vary pretty significantly if you were using one of the commercial compilers that came with an IDE other than avr studio.
Windows only, of course.
Ouch. Why pay for a book. There are lot's of resources for learning C online. Any one of them will apply to the Arduino.
The Arduino website itself in the reference, learning, hacking and links pages have plenty of info.
Thanks guys. My question was more on the mechanics of compiling, downloading and executing C programs rather than learning C itself.
That would be somewhat more specific to the development environment you are using... i think
For the ATmega168 (and '644) I use EMACS to edit my programs and then
a make file to compile and download my programs. I use the 6-pin ICSP header
and the AVRISPMKII programmer (apx $35 from Digi*Mouse).
Typing "make" compiles the program and typing "make isp" downloads to
flash. No bootloader is required. I use avr-gcc for the C compiler. It is a much
quicker process than the Arduino tools.
The process is the same for the '168, '328 or '644. Just a couple of constants change
in the Makefile.
(* jcl *)
I use eclipse or avr studio and a avr isp mk2 programmer.
But I guess its 3 steps in programming the chip what ever you use.
1/ write the c code and debug. Using a IDE or test editor
2/ compile the C code and turn it into a HEX file
3/ download the HEX file into the chip via USB with bootloader or with an ISP programmer direct.
My question was more on the mechanics of compiling, downloading and executing C programs
So; what operating system? What's your favorite editor? Are you comfortable using a "shell" window or are you a modern GUI kind of person? Which shell do you use? Do you want the compiler/etc in your paths by default, or only when you're actively "doing C" ? You did mean gcc, right?
There are all these ... fiddling COMPLICATIONS to working with C, and that's one of the things that makes the Arduino environment so wonderful for beginners.
(I assume you want an answer other than "rename foo.c to foo.pde, change the main() to setup() and add
a null loop() function", and then just use the arduino environment...)
Ouch. Why pay for a book.
Smiley has his book, but he also has some free downloadable pdf files that I think cover the basics.
There are all these ... fiddling COMPLICATIONS to working with C, and that's one of the things that makes the Arduino environment so wonderful for beginners.
I give a lot of credit to Atmel too.
I work with EMACS/make/avr-gcc on Linux. The fellow I am working with works on
Windows with avr-studio (avr-gcc). I can email him a tarball containing the project
and he can compile and flash it without change. I have worked with a few other chips and it has never been this easy.
(* jcl *)