I've never programmed in C, just in Arduino IDE, so not sure how to convert my sketch to C. Does the IDE do that maybe when it compiles it?
First of all, programming in C is not much harder than in Arduino. The Arduino program (which I refuse to call an IDE) converts all your sketches into C before it compiles them. However, I believe that the resulting hex code will not work on a plain AVR without the Arduino bootloader installed (I would like an answer to this).
I will try to explain. This is why I hate Arduino, because by trying to make something simple, they have made it so there is a large amount of people who don't understand what is happening. By making it simpler, they make it harder.
The AVR microcontroller only understands Intel Hex code. So a compiled AVR program will be hex code, whether that hex code comes from a C compiler, or an assembler, or the Arduino program; the AVR doesn't care.
The standard (not-arduino) way to program AVRs is to flash the hex code (which is generated either with an assembler or with your C compiler) using the 6-pin ICSP header. You normally use an ISP programmer, like a ladyada USBtinyISP, to do this, using a downloading program like avrdude. This is not hard to do. You just need an ISP device. Since the Sparkfun board has a spot for the 6-pin header, you can easily use this method. Also all Arduino boards have a 6-pin header, so you can use this method with any Arduino board and forget it is an "Arduino" at all and just use the board in the normal AVR way.
The Arduino way of programming is different. In the Arduino way, you install the Arduino bootloader program onto the AVR chip. In order to do this, you actually need to have an ISP (when you buy an Arduino board, this has already been done for you). This bootloader program does one important thing: When the AVR is first turned on, the bootloader program checks the serial port and waits to see if you are trying to download an Arduino sketch. If you are, it sucks it in the serial port and installs it. If you are not, it runs the program that is already installed. If there is no program installed, and you aren't trying to download one, the bootloader does nothing. Technically speaking, the bootloader is a waste because it just takes up program memory, and it makes the Arduino much slower to start up. An AVR programmed in the standard way can wake up and run code in less than a millisecond. With the bootloader, it takes much longer. Many hobby people don't care about this. The entire point of the bootloader is so that you can use the serial port to download programs. So if you buy a chip that already has the bootloader on it, you never need an ISP. But if your computer doesn't have a serial port (and not many do), you still need to buy a USB-to-serial or FTDI cable anyway, which isn't any cheaper than an ISP. Of course the full-blown Arduino boards have a USB-to-serial convertor built in so you can just plug them in. This is kind of silly because you are basically buying a USB-to-serial converter with every Arduino board you buy, when you really only need one and then you could reuse it for every board. But that's Arduino for you.
If you already have an Arduino board (I did not know that for sure) then you can use the arduino board as an ISP to program ANOTHER board. This is exactly the same thing as using a normal ISP programmer like a USBtinyISP; just using an arduino board as the ISP device, so you don't have to buy an ISP device. But this is still only good for flashing hex code to the target board in the standard (non-Arduino) way. That's what the guy in that website is doing. And it sounds like he didn't modify the target board firmware himself, he just downloaded a new version of the hex code and flashed it onto the target board, using his Arduino as the ISP.
When you click the "compile" button on the Arduino program, the Arduino program converts your sketch into legal C code, and then compiles it with the regular C compiler. But the hex code that you get at the end will only work with the Arduino bootloader (to my knowledge, I am not sure about this--anyone know?).
Bottom line: If you want to write custom firmware for that sparkfun board, you can do it. You can either
-
buy an ISP, or convert your UNO to be one (this sounds like a lot of trouble; ISPs are only $20, and then you won't have to reconfigure your UNO into an ISP every time you want to flash a program). You will have to write your code in regular C (this is not any harder than writing in Arduino, but you won't be able to call the Arduino libraries--no loss since most of them aren't that good anyway). OR you may be able to flash a hex file from a compiled Arduino program directly to the AVR (I don't think this works, but someone may correct me. It would be great if it did).
-
flash the Arduino bootloader onto it the chip so you can download programs from the Arduino. But in order to download Arduino sketches, even with the Arduino bootloader on the chip, you will need need the FTDI pin connections, which I don't know if the sparkfun board brings those out. You will need an ISP to flash the bootloader anyway, so if you have to buy an ISP, or configure your UNO into one, you might as just use it for programming the sparkfun board directly (the 6-pin header is right there for you to use) and forget about trying to use Arduino with it.