/* ITA
Codice per pilotaggio dell'interruttore optoelettronico MST_K17.
Collegando il pin CNT=53 all'ingresso positivo del modulo MST_K17
e l'ingresso negativo alla GND della scheda Arduino( MEGA)
accendera' e spegnera il carico tramite il modulo MST_K17 per un tempo ( in millisecondi) settati con la variabile dly
Come carico del MST_K17 si puo usare una lampada. un motore o un riscaldatore
*/
/* ENG
Simple code for driving the optoelectronic AC relay MST_K17.
Connecting the pin CNT=53 at the positve input of the MST_K17
and its negative input to the GND of the Arduino board (MEGA)
the load will be turn on / off by the MST_K17 module for a time ( in milliseconds) set by the variable dly
As load of the MST_K17 you can use a lamp, motor or heater.
*/
// set pin numbers:
const int CNT = 53; // the number of the CNT pin
// variables will change:
int dly=100; // tempo di ON e OFF del modulo
void setup() {
pinMode(CNT, OUTPUT); // CNT pin as an output:
}
void loop() {
digitalWrite(CNT,HIGH);
delay(dly);
digitalWrite(CNT,LOW);
delay(dly);
}