Skip to content

Instantly share code, notes, and snippets.

@azend
Last active December 11, 2015 21:48

Revisions

  1. azend revised this gist May 6, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.ino
    Original file line number Diff line number Diff line change
    @@ -21,9 +21,9 @@ unsigned char greenBrightness = round( 255 / 3.0f );
    unsigned char blueBrightness = round( 255 / 3.0f ) * 2;

    void setup () {
    pinMode( RGB_RED, HIGH );
    pinMode( RGB_GREEN, HIGH );
    pinMode( RGB_BLUE, HIGH );
    pinMode( RGB_RED, OUTPUT );
    pinMode( RGB_GREEN, OUTPUT );
    pinMode( RGB_BLUE, OUTPUT );
    }

    void loop () {
  2. azend revised this gist Jan 29, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.ino
    Original file line number Diff line number Diff line change
    @@ -17,8 +17,8 @@
    #define PHOTOCELL 5

    unsigned char redBrightness = 0;
    unsigned char greenBrightness = round( 255f / 3f );
    unsigned char blueBrightness = round( 255f / 3f ) * 2;
    unsigned char greenBrightness = round( 255 / 3.0f );
    unsigned char blueBrightness = round( 255 / 3.0f ) * 2;

    void setup () {
    pinMode( RGB_RED, HIGH );
  3. azend created this gist Jan 29, 2013.
    39 changes: 39 additions & 0 deletions gistfile1.ino
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    /* Diyode CodeShield Pinout Constants */
    #define ENCODER_A 14
    #define ENCODER_B 15
    #define ENCODER_PORT PINC
    #define SWITCH 13
    #define BUTTON 12
    #define RGB_RED 11
    #define RGB_GREEN 10
    #define RGB_BLUE 9
    #define LED 6
    #define SERVO 5
    #define PIEZO 3
    #define RELAY 2
    #define POT 2
    #define HALL 3
    #define THERMISTOR 4
    #define PHOTOCELL 5

    unsigned char redBrightness = 0;
    unsigned char greenBrightness = round( 255f / 3f );
    unsigned char blueBrightness = round( 255f / 3f ) * 2;

    void setup () {
    pinMode( RGB_RED, HIGH );
    pinMode( RGB_GREEN, HIGH );
    pinMode( RGB_BLUE, HIGH );
    }

    void loop () {
    redBrightness ++;
    greenBrightness ++;
    blueBrightness ++;

    analogWrite( RGB_RED, redBrightness );
    analogWrite( RGB_GREEN, greenBrightness );
    analogWrite( RGB_BLUE, blueBrightness );

    delay (15);
    }