view history edit print login register

:: Code Library and Tutorials ::
This code is not specific to any external devices. Code for that is found in InterfacingWithHardware. Here you find general use software snippets and libraries for calculations and 'internal' purposes.


Code Snippets and Utility Libraries

Tutorials and Resources


Code Snippets and Utility Libraries.

AVR Related

Protothreading, Timing & Millis

  • Metro Lib: Implementation of recurring timed events like blinking LEDs or servo motor control
  • TimedAction a resource-friendly library for Timed Actions that occur every x millisecond.
  • DateTime library Software real time clock
  • EventFuse: Recurring clocked events via a count-down fuse
  • The Tween class for ramps (PWM fades, for instance)
  • millis() rollover handling: a function for detecting and handling rollover of the millis() function.
  • Prescaler-related utility library : easy get/set of the prescaler + alternative functions to millis() / delay()
  • heartbeat sketch - use an array to create an irregular blink pattern
  • Stopwatch: doing multiple things at the same time.
  • Scheduler: Javascript timer functions ported to Arduino to call your functions when you want them to be called.
  • DCF77: DCF77 Library v.0.1 beta - March 2010.

Input / Output

Storage

Communication

  • Serial
    • Streaming output: A simple way to get <<-style output with Serial/LCD/Ethernet/etc.
    • SerialDebugger is a library that ebhances code readability, and debug control.
    • NewSoftSerial: An interrupt-driven alternative to the core SoftSerial library.
    • SerialIP provides Internet connectivity over the serial port (no shields required)
  • Twitter

General

Math


Tutorials and Resources

These aren't code for a particular function, but rather tutorials on various aspects of C/C++.

Navigation

AVR Related

  • Let the arduino sleep.
  • C language
    • A very good summary of the C language (.pdf)
    • Reference for the standard C API (libc).
      To use with Arduino, add the appropriate #include to the top of your sketch and use the functions as documented in the manual.
    • Variable Cope
      • An explanation of the parts of a sketch that can "see" a particular variable. For example, some variables are global, some are contained within a particular function, etc. Variable Scope
  • Port Manipulation
    • More explanation of ports and manipulating them with bitwise operators.
      Port Manipulation

Protothreading, Timing & Millis

  • This section needs to be extended

Input / Output

Storage

Communication

General

Math

  • Bit Math Tutorial
    • Learn how to decipher all those cryptic formulas you see in C code that use symbols like &= and <<. Start using bitwise operators in your own code to save memory and perform sophisticated low-level operations on your microcontroller hardware.