Skip to content
dCouple is an Arduino library to help seperate your application state from the hardware state.
C++ C Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Analog
Digital
LED
.gitignore
Clock.cpp
Clock.h
Connection.cpp
Connection.h
Identifier.cpp
Identifier.h
README.md
Sink.cpp
Sink.h
Source.cpp
Source.h
State.cpp
State.h
dCouple.cpp
dCouple.h
dCouple_Test.pde

README.md

dCouple

dCouple is an Arduino library to help seperate your application state from the hardware state. dCouple works without Aiko, but it doesnt make a whole lot of sense to do so.

Example:

#include <AikoEvents.h>
#include <dCouple.h>

dCouple::LED::RGB rgb (0, 255);
dCouple::Analog::OutputPin* pins[3];

void setup() {
  for (int i = 0; i < 3; i++) {
    pins[i] = &dCouple::Analog::OutputPin(i + 9);
    pins[i]->is_connected_to(rgb.led(i));
    pins[i]->update_frequency(&Aiko::Events, 20);
  }
  Aiko::Events.addHandler(cycleAnimation, 2000);
}

void cycleAnimation() {
  for (int i = 0; i < 3; i++) {
    rgb.led(i)->animate_intensity_to(random(64),50);
  }
}

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

dCouple is Copyright (c) 2010 James Harton, Sociable Limited. Released under an MIT license.

Something went wrong with that request. Please try again.