Skip to content

Instantly share code, notes, and snippets.

@amcjen
Created May 28, 2014 15:34
Show Gist options
  • Save amcjen/983f2f38b8f995a5c3d7 to your computer and use it in GitHub Desktop.
Save amcjen/983f2f38b8f995a5c3d7 to your computer and use it in GitHub Desktop.
#include <Scout.h>
#include <SPI.h>
#include <Wire.h>
#include <Scout.h>
#include <GS.h>
#include <bitlash.h>
#include <lwm.h>
#include <js0n.h>
void setup() {
Scout.setup("FadeRGB", "unknown", -1);
}
int red, green, blue;
long time = 0;
void loop() {
Scout.loop();
time = millis();
red = 128 + 127 * cos(2 * PI / 2000 * time);
green = 128 + 127 * cos(2 * PI / 2000 * (500 - time));
blue = 128 + 127 * cos(2 * PI / 2000 * (1000 - time));
Led.setColor(red, green, blue);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment