Skip to content

Instantly share code, notes, and snippets.

@annem
Created January 25, 2013 23:54
Show Gist options
  • Save annem/4638977 to your computer and use it in GitHub Desktop.
Save annem/4638977 to your computer and use it in GitHub Desktop.
#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