LoRaWAN-Signal-Mapping/iot/main/peripheral.cpp

21 lines
498 B
C++
Raw Normal View History

#include <Arduino.h>
void peripheral_register(uint8_t pin_number) {
pinMode(OUTPUT, pin_number);
// Disable the device by default to avoid issues
digitalWrite(pin_number, HIGH);
}
void peripheral_unsilence(uint8_t pin_number) {
digitalWrite(pin_number, LOW);
}
void peripheral_silence(uint8_t pin_number) {
digitalWrite(pin_number, HIGH);
}
void peripheral_switch(uint8_t pin_number_old, uint8_t pin_number_new) {
digitalWrite(pin_number_old, HIGH);
digitalWrite(pin_number_new, LOW);
}