Wiring is a simplified form of C++ - it provides a simple API and removes some of the requirements of C++ by using a preprocessor to do things such as automatic prototype declarations.
Currently have support for ATMEGA168, 328, 1280 & ATTINY2313. Adding new microcontrollers involves creating a new header file from the data sheet. Most of it can be cut and pasted from an existing header as Atmel have strived to be consistent between controllers.We try to keep the code lean by doing as little handholding as possible – we just get the job done, in as few instructions as possibleAvoid unnecessary memory allocations, use appropriate datatypesWe provide busy waiting and interrupt driven variants of most peripheral functions, allowing the microcontroller to get on with other work while the task progressesThe Arduino libraries make use of deprecated macros such as the old cbi & sbi macros, and also produces warnings when compiled
How To Build A Better Arduino
How to Build a Better Arduino – the Development of MHVlib<br />Alastair D’Silva<br />@EvilDeece<br />http://alastair.d-silva.org<br />http://www.makehackvoid.com<br />
What is an Arduino<br />A hardware and software platform for prototyping electronics<br />Low entry barrier allows programmers to interact with the real world<br />Built on top of Wiring<br />
Love Arduino<br />Cheap hardware<br />Simple to understand<br />Serial bootloader makes programming easy<br />
Servo Library<br />Arduino Servo<br />Consumes 1 16 bit timer per 12 servos<br />~10 bits of significance<br />Resolution of 16 clock cycles<br />ArduinoSoftwareServo<br />Uses a 16 bit int, valid values are 0 to 180<br />Refresh must be called periodically<br />Sorts the list of servo positions on each pass<br />Lots of busy waiting<br />MHVlib<br />Uses a uint16_t, 0-65535 (~14 bits significant)<br />Consumes 1 16 bit timer<br />Resolution of 2 clock cycles<br />No restrictions as to how many servos<br />Only sorts when positions change<br />
First (Real) Project<br />Spindle controller for a CNC Mill<br />Generates a servo signal to a BLDC controller to drive an RC helicopter motor (up to 1.8kW)<br />Read from the serial port and set the speed<br />Monitor the spindle and adjust the speed<br />Report actual speed back to the PC<br />Arduino version<br />11,900 bytes of flash<br />500 bytes of RAM<br />MHVlib version<br />6930 bytes of flash<br />177 bytes of RAM<br />