// Alarm bend94- A 30/10/21EG
int AlarmPin = A0; // select the input pin for the potentiometer
float AlarmValue = 0;
float Vadc =0;
void setup() {
Serial.begin(9600);
Serial.println("Ready");
}
void loop() {
// read the value from the sensor:
AlarmValue = analogRead(AlarmPin);
Vadc= 5 * (AlarmValue/1024);
Serial.print(Vadc);
Serial.print(" ");
Serial.print(AlarmValue);
Serial.print(" ");
if (Vadc >= 4){
Serial.println ("Shunted");
}
if (Vadc <= 2){
Serial.println ("Window");
}
if (Vadc >= 2 && Vadc <= 4){
Serial.println ("Normal");
}
delay(2000);
}
RPi + FreePBX seems to be like using a cannon to swat a fly if that’s all it is going to do. There is no problem having an Arduino compatible board do all of the functions you’ve mentioned. Or, you could get a board that uses MircoPython if you want to program in Python and still do it all with the MCU and a GSM module which will be able to send SMS using simple serial commands.hi thank you for your code.
i will study that
My project will be designed like this :
Arduino Uno connected to a raspberry pi through usb.
Arduino sketch will loop on reading the analog inputs and sending the result on the USB port
Raspberry will be installed with freepbx to be able to manage a 4GDevice key (to send sms)
Raspberry will also run a python code in background , reading USB from uno, manage alarm on/off and sms if needed.
Last , i have to design a UPS like with a battery to be able to go on if power failure.
If you have an idea for this ups , let me know
i posted another subject on this on the forum
best regards