Bi-monthly release with minor bug fixes and improvements
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
// Changes the values from kelvin to c and such before writing to analog pins.
int mapAndSendAnalog(int pin) {
//some scalation are use. Don't change without changing also skeleton file
int value=0;
int result=0;
switch(pin) {
//PIN 14->A0, 24->A10
case 0:
result=(IR+273)*20;
break;
case 1:
result=(Tir+273)*20;
break;
case 2:
result=(P/10);
break;
case 3:
result=(Tp+273)*20;
break;
case 4:
result=HR*100;
break;
case 5:
result=(Thr+273)*20;
break;
case 6:
result=(Dew+273)*20;
break;
case 7:
result=Light;
break;
case 8:
result=Clouds;
break;
case 9:
result=(skyT+273)*20;
break;
case 10:
result=(T+273)*20;
break;
default:
result=value;
break;
}
Firmata.sendAnalog(pin,result);
}
// Writes the alerts when condition met
void checkMeteo() {
if (cloudy==1) {
digitalWrite(PIN_TO_DIGITAL(3), HIGH); // enable internal pull-ups
} else {
digitalWrite(PIN_TO_DIGITAL(3), LOW); // disable internal pull-ups
}
if (dewing==1) {
digitalWrite(PIN_TO_DIGITAL(4), HIGH); // enable internal pull-ups
} else {
digitalWrite(PIN_TO_DIGITAL(4), LOW); // disable internal pull-ups
}
if (frezzing == 1) {
digitalWrite(PIN_TO_DIGITAL(5), HIGH); // enable internal pull-ups
} else {
digitalWrite(PIN_TO_DIGITAL(5), LOW); // disable internal pull-ups
}
if (Light>MINIMUM_DAYLIGHT) {
digitalWrite(PIN_TO_DIGITAL(6), HIGH); // enable internal pull-ups
} else {
digitalWrite(PIN_TO_DIGITAL(6), LOW); // disable internal pull-ups
}
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.