Waldmensch
Young grasshopper
- Jul 16, 2015
- 30
- 0
I connected an Arduino Nano with an optocoupler to GND and Alert pin. So if Arduino pin D6 is high, the optocoupler opens and connect GND to Alert pin. It works like a charm
Arduino programm to trigger an alert every minute:
Arduino programm to trigger an alert every minute:
Code:
int led = 13;int out = 6;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pins as an output. Led is the status LED on arduino as indicator
pinMode(led, OUTPUT);
pinMode(out, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(out, HIGH); // fire/close D6
delay(500); // wait for 500ms
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
digitalWrite(out, LOW); // open D6
delay(60000); // wait for a minute
}
Attachments
Last edited by a moderator: