Skip to content

Instantly share code, notes, and snippets.

@dastels
Created April 12, 2017 19:13
Show Gist options
  • Save dastels/6a8d3584fcfe6a53740502691f789007 to your computer and use it in GitHub Desktop.
Save dastels/6a8d3584fcfe6a53740502691f789007 to your computer and use it in GitHub Desktop.
medium test
void initialize_sensors(isr motion_isr)
{
if (has_motion()) {
pinMode(MOTION_PIN, INPUT);
attachInterrupt(digitalPinToInterrupt(MOTION_PIN), motion_isr, CHANGE);
}
if (has_prox()) {
prox_sensor.init();
prox_sensor.setTimeout(500);
}
if (has_si7021()) {
si7021 = Adafruit_Si7021();
si7021.begin();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment