Motivation Button

Introduction: Motivation Button

About: Freelance Film Maker From Whitehorse Yukon. I enjoy biking, skiing, kayaking, and rock climbing among other things

This is a simple intro project for creating a "Motivation Button" with the intel Edison and the grove starter kit.

All you will need is a computer, a configured Intel Edison and the grove starter kit.

So lets jump right in!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Plug It In

Connect both micro usb cables to your computer, and open the Arduino app.

Put in the spark shield on your Edison and plug in your Grove LCD RBG Backlight to I2C port and your Grove Button into D2 port.

Step 2: Code It!

In the Arduino app paste in this code:

<p>#include "rgb_lcd.h"</p><p>#include <Wire.h></p><p>rgb_lcd lcd;</p><p>const int buttonPin = 2;</p>void setup() 
{   lcd.begin(16, 2);
    pinMode(buttonPin, INPUT);
}
int colorR = 25;
int colorG = 255;
int colorB = 100;
void loop() 
{
  lcd.setRGB(colorR, colorG, colorB);
  lcd.clear();
  int buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {
    lcd.write("You can do it!");
    int colorG = 255;
    int colorR = 0;
  } else {
    lcd.write("Need motivation?");
    int colorR = 255;
    int colorG = 0;
  }
 delay(100);
}


Click the arrow pointing to the right to upload

Be the First to Share

    Recommendations

    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest

    3 Discussions

    0
    hacker-cycle
    hacker-cycle

    5 years ago

    You shouldn't have to change anything just download the Intel arduino ide http://arduino.cc/en/main/software and make sure you have your Galileo selected under "board" the follow my instruct able as if it was a Edison ;)

    0
    NadiaB
    NadiaB

    5 years ago on Introduction

    I would love to try this but I have Galileo instead of Edison.
    is there any other way I can manipulate the code?