Main Page

From Tinkerish

Revision as of 21:54, 29 December 2011 by Mike (Talk | contribs)
Jump to: navigation, search Wiki

This wiki holds documentation for projects such as libarduino.


Arduino (the Tinkerish way)

The goal of this page and the software it contains is to provide an easy to use core that allows standard C developers who want to use the standard GNU AVR toolchain to be able to take advantage of the mass produced Arduino hardware. Arduino hardware was designed to use the arduino java based IDE. It uses its own language that seems to be somewhere between C and C++ but not quite either. For those of us who enjoy standard C and our command line tools like gcc and make, let me introduce you to our way of doing things.

  • take advantage of the popular Arduino hardware
  • use GNU toolchain (avr-gcc, avr-libc, make) instead of the strange arduino processing language
  • prototype with Arduino hardware connected to breadboards, hookup wire, etc
  • order custom boards with the same connections as Arduino so that the same code can be used with production


libarduino is a standards based C library that matches up with the Arduino hardware. It provides easy to use functions on Arduino hardware using standard GNU toolchain. Now you can program your Arduino with standard C and avr-gcc.

Note: Technically it is not a library because it is just source code to build with and link to your own source code. This is currently on purpose because size is so important. I've been meaning to experiment with building it into a real system wide installed avr library and measuring the increased size as I pull in the different modules. Until I have time to do this, it will live as it is.

source code

 svn checkout libarduino-read-only

or browse in webbrowser


libardunio reference documentation

building and installing

Building and programing your arduino is simple. No IDE necessary! libarudino consists of a .c file, a .h file, and a Makefile. For now, it is not actually built or distributed as a library. In the future, it may be built as a library so that one doesn't have to use the #defines to keep the code smaller.

  • edit libarduino.h to fit your needs
  • edit the Makefile to match your arduino
  • hit and release the reset button on your arduino
 $ make clean
 $ make
 $ make install

'make install' will program your arduino over the usb serial connection. Most people find that the current version of avrdude requires that you hit and release the reset button less than a second before you program the arduino.

Personal tools