Simple framework for allowing Arduino applications / examples / libraries to be built in a modular, event-driven fashion. Aiko enables more events and less delay()s !
C++ C Python Perl Objective-C Arduino
Permalink
Failed to load latest commit information.
aiko_commands Added freeRAM() for determining amount of available heap/stack space … May 25, 2012
aiko_devices Change "temperatureDS1820Value" to be single fixed-point 2 decimal pl… Jun 14, 2012
examples Support for Pebble V1 light sensor. May 31, 2012
notes Renamed "docs/" to "notes/". Aug 11, 2011
nursery Updated for Arduino IDE 1.0 Jan 15, 2012
tests Updated for Arduino IDE 1.0 Jan 15, 2012
.gitignore Updated "readme.markdown" to reflect new repository location. Aug 11, 2011
AikoCallback.h Added ifdef wrapper to AikoCallback header. Jul 9, 2009
AikoCommands.cpp Correctly refer to "FreeRam.cpp" and "FreeRam.h" for case-sensitive Jun 24, 2012
AikoCommands.h Correctly refer to "FreeRam.cpp" and "FreeRam.h" for case-sensitive Jun 24, 2012
AikoCommandsHack.h Modularize all of "aiko_node.pde" ... create separate "aiko_commands"… Mar 28, 2010
AikoDeviceMCP320x.cpp Updated for Arduino IDE 1.0 Jan 15, 2012
AikoDeviceMCP320x.h MCP320x code cleanups. Jul 15, 2009
AikoDeviceSPIBus.cpp Updated for Arduino IDE 1.0 Jan 15, 2012
AikoDeviceSPIBus.h Implicit setup of SPI and MCP320x. Jul 14, 2009
AikoDevices.cpp Support for Pebble V1 light sensor. May 31, 2012
AikoDevices.h Support for Pebble V1 light sensor. May 31, 2012
AikoEvents.cpp Updated for Arduino IDE 1.0 Jan 15, 2012
AikoEvents.h Events now uses Callbacks internally. Jul 7, 2009
AikoSExpression.cpp First cut at one-shot event handlers. Jul 3, 2009
AikoSExpression.h Added extra arguments to SExpression scan method. May 19, 2009
AikoTiming.cpp Updated for Arduino IDE 1.0 Jan 15, 2012
AikoTiming.h Code layout cleanups. Jul 1, 2009
Makefile First cut at SPI and MCP320x device support. Jul 9, 2009
readme.markdown Updated "readme.markdown" to reflect new repository location. Aug 11, 2011

readme.markdown

Aiko: Arduino Framework

This project is part of the Aiko Platform

Contents

Introduction

A small modular, event-driven framework for structuring Arduino sketches, such that individual device drivers can be easily componentized and combined into a single application.

Aiko allows you to write event-driven code:

#include <AikoEvents.h>
using namespace Aiko;

int ledPin = 13;

void setup() {
  pinMode(ledPin, OUTPUT);
  Events.addHandler(blink, 1000);  // Every 1000ms
}

void loop() {
  Events.loop();
}

void blink() {
  static boolean on = HIGH;
  digitalWrite(ledPin, on);
  on = !on;
}

Writing individual device drivers as event-driven functions makes it simpler to create device specific modules that can be shared with others and easier to then combine and integrate them with less code changes.

Community

Please join the developer community on the Aiko-Platform Google Group and subscribe to the email list.

Report bugs on our GitHub bug tracker

Download

The Aiko Arduino framework is a library that requires the Arduino IDE or compiler tool chain.

Feedback and issues

Tracking is managed via GitHub ...

Installation

Change into your Arduino libraries folder and use git to clone the project.

On a Mac this looks like:

cd /Applications/arduino-0022/hardware/libraries
git clone git://github.com/geekscape/aiko_arduino.git

On Linux, this will directory will be wherever you install your Arduino software.

Alternatively you can download a tarball or ZIP archive from the Aiko repository by clicking the "download" link at:

http://github.com/geekscape/aiko_arduino/tree/master

Note: Since Arduino IDE 0017, you can create a "libraries/" directory and "git clone" the "aiko_arduino" repository in that directory.

Upgrading

To upgrade to the latest version:

cd /Applications/arduino-0022/hardware/libraries/aiko_arduino
git pull
make clean

(If you're on a Mac, you'll need XCode installed.)

Modules

  • Callback - Easy to use function and method callbacks.
  • Events - Schedule regular callbacks so you can easily deal with a bunch of devices connected to your Arduino.
  • SExpression - Parse simple SExpressions. Think of this as the Arduino equivalent of JSON.
  • Timing - Accurate timing, including better replacements for the standard Arduino timing functions.

See the corresponding files in the docs directory for more info on each module.

Known problems

  • TO DO

Written by Andy Gelme and Pete Yandell.

Copyright (C) 2009 by Geekscape Pty. Ltd.

Copyright (C) 2009 by Pete Yandell.

Released under the GPLv3 license (dual-licensed).