Created
January 25, 2013 23:54
-
-
Save annem/4638977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Esplora.h> | |
int light; | |
int temp; | |
int slider; | |
void setup() { | |
Serial.begin(9600); | |
Keyboard.begin(); | |
} | |
void loop() { | |
light = Esplora.readLightSensor(); | |
temp = Esplora.readTemperature(DEGREES_F); | |
slider = Esplora.readSlider(); | |
Serial.print(slider); | |
Serial.print("\t"); | |
Serial.print(light); | |
Serial.print("\t"); | |
Serial.println(temp); | |
delay(1000); | |
if (slider < 500){ | |
Keyboard.print(light); | |
Keyboard.press(KEY_TAB); | |
Keyboard.release(KEY_TAB); | |
Keyboard.println(temp); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment