Like i said , i'm doing the tests for the school project. I have to find the best solutions before the end of June. I am already using Linux and I find it better than Windows.That's why I asked for the Plugin for Linux , because want to try Linux HS3.
Since I couldn't instal Arduino Plugin on Linux, I'm tring it on Windows.
Something happened today that made me think about it. The PC crashed and nothing was working anymore. And that for a private house is not a problem. But for an office or a school it's different.
That's what I thought : putting Arduino as watchdog for making PING to PC every 10-15 sec. If the PC doesn't respond , makes another ping to router (o to Google) and find out where is the problem (router or PC). If it's a PC problem, Arduino reset the PC.
Than I want to make 2 sketch for every single arduino of the system. So, if the PC not responds to PING, Arduino Watchdog sents a signal to every arduino to an pin ("Control pin").
If the signal isn't (il PC work and respond to the PING) - the arduinos work normally ( Arduinos connects to HS3 ) with sketch 1.
If the signal is from Arduino Watchdog (what means the PC don't work and don't respond to PING) - the Arduinos executes sketch 2 (who makes Arduino a stand alone unit). Obviously, in this case, it will not be possible to control from remote or to control from Touch (or smartphone) and the media Plugin wont be working.
But that would be an "emergency situation" and there is the opportunity to turn on the lights.
What is your opinions about this?
Esempio sketch:
....
#define Control 13
void setup ( ) {
pinMode (Control,INPUT_PULLUP);
....
....
}
void loop ( ) {
controlState = digitalRead(Control);
if (buttonState == LOW) {
void (stand-alone)
}
else {
void (HS3)
}
Since I couldn't instal Arduino Plugin on Linux, I'm tring it on Windows.
Something happened today that made me think about it. The PC crashed and nothing was working anymore. And that for a private house is not a problem. But for an office or a school it's different.
That's what I thought : putting Arduino as watchdog for making PING to PC every 10-15 sec. If the PC doesn't respond , makes another ping to router (o to Google) and find out where is the problem (router or PC). If it's a PC problem, Arduino reset the PC.
Than I want to make 2 sketch for every single arduino of the system. So, if the PC not responds to PING, Arduino Watchdog sents a signal to every arduino to an pin ("Control pin").
If the signal isn't (il PC work and respond to the PING) - the arduinos work normally ( Arduinos connects to HS3 ) with sketch 1.
If the signal is from Arduino Watchdog (what means the PC don't work and don't respond to PING) - the Arduinos executes sketch 2 (who makes Arduino a stand alone unit). Obviously, in this case, it will not be possible to control from remote or to control from Touch (or smartphone) and the media Plugin wont be working.
But that would be an "emergency situation" and there is the opportunity to turn on the lights.
What is your opinions about this?
Esempio sketch:
....
#define Control 13
void setup ( ) {
pinMode (Control,INPUT_PULLUP);
....
....
}
void loop ( ) {
controlState = digitalRead(Control);
if (buttonState == LOW) {
void (stand-alone)
}
else {
void (HS3)
}
Comment