Skip to content

Instantly share code, notes, and snippets.

@ShawnHymel
Created June 3, 2016 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShawnHymel/34ca98f17c629810f28dfc8c65ba7613 to your computer and use it in GitHub Desktop.
Save ShawnHymel/34ca98f17c629810f28dfc8c65ba7613 to your computer and use it in GitHub Desktop.
Sample Arduino code for the Beefcake Relay
// Turn the Beefcake Relay on for 2 seconds and off for 2 seconds
//
// Hardware:
// Relay Kit | Arduino
// -------------|---------
// 5V | 5V
// CTRL | pin 7
// GND | GND
// Pins
const int RELAY_PIN = 7;
void setup() {
pinMode(RELAY_PIN, OUTPUT);
}
void loop() {
// Turn the relay on for 2 seconds and off for 2 seconds
digitalWrite(RELAY_PIN, HIGH);
delay(2000);
digitalWrite(RELAY_PIN, LOW);
delay(2000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment