Skip to content
Paul Shelley edited this page Jul 28, 2015 · 13 revisions

Welcome to the ColorsExample wiki!

ColorsExample is an Arduino sketch for the LightBlue Bean from Punch Through Design and is intended to help users get started with the Handy BLE app from the iTunes App Store. Handy BLE includes a 'Colors Example' project that is already set up to work with the LightBlue Bean when running this sketch.

This sketch, along with the example project in Handy BLE, allows the user to change the RGB LED on the LightBlue Bean by tapping different colored buttons on the iPhone. This is intended as a simple example that will allow Makers to quickly see how Handy BLE works with the LightBlue Bean so that they can edit and adapt the tools for their own custom projects.

void getCommand() {
   while (Serial.available()) {
    char newChar = (char)Serial.read();
    if (newChar == '#') {
      commandStarted = true;
      command = "\0";
     } else if (newChar == ';') {
      commandStarted = false;
      commandCompleted();
      command = "\0";
    } else if (commandStarted == true) {
      command += newChar;
    }
  }
}
Clone this wiki locally