Skip to content

Instantly share code, notes, and snippets.

@StuffAndyMakes
Last active December 27, 2015 22:59
Show Gist options
  • Select an option

  • Save StuffAndyMakes/7403170 to your computer and use it in GitHub Desktop.

Select an option

Save StuffAndyMakes/7403170 to your computer and use it in GitHub Desktop.
Arduino code for FitBit Cheat-O-Matic
#include <Servo.h>
#define SERVO_PIN 9
#define SPEED_POT 14
Servo fitBitShaker;
void setup() {
fitBitShaker.attach( SERVO_PIN );
pinMode( SPEED_POT, INPUT );
}
void loop() {
int stopTime = 1000 * ( analogRead( SPEED_POT ) / 1023.0 );
fitBitShaker.write( 130 );
delay( stopTime );
fitBitShaker.write( 90 );
delay( stopTime );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment