Scale for connected beehives

Hello,
i am building a connected scale for beehives with an arduino mkr1200 board.

I got this code from the internet, but I would like to add some elements, and I have some additional constraints
but as I begin I am a little hooked, and I ask for your help for that; thank you.

Would it be possible that the program could measure the weight of the hive most regularly without sending them immediately (these will be sent when sending messages) but if there is a drop in weight (between 500gr and 3kg) suddenly then I receive an alert by email.

Then I have to be able to send my donations through the sixfog network but I don't know where and how do I add the command line for that (or put the link to my sigfox page?)

unfortunately 1st constraint I am limited to 140 message sending per day.
so I would like to add a photoresistor cell that can return the amount of sunshine to me,
thanks to this rate I would like to be able to distinguish 3 elements (the duration of the day and the night, and the level of intensity of the sun)
of that I would like a pendant

  • at night the sending of a message is done every 2 hours or 3 hours,
  • the message sending day is equal to [duration of the days divided by (140 (max number of message sent / days) - number of messages sent at night - number of alert messages)]

I would also like to add an atmospheric pressure sensor
and also add a temperature probe (for the inside of the hive)
the DHT22 probe remaining outside (already in the code)

I would like to be able to see them constantly giving out on an LCD screen and cut off the alert messages when I am working on my hives

Could you tell me if it would be possible to join several balances (HX711 module) and if so up to how many I could put?
and what would be the code to add the extra scales?

Thank you for your help

#include <SigFox.h>
#include <ArduinoLowPower.h>
#include <Adafruit_Sensor.h>
#include <HX711.h>

// /////////////////// temperature
#include <DHT.h>

#define DHTPIN 4
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);

// ////////////////////////// balance
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;
HX711 scale;
float calibration_factor = 13200;
String poidslimite;
String poids;
String dec;
// /////////

typedef struct __attribute__ ((packed)) sigfox_message {
  // int16_t moduleTemperature;
  float poids;
  float t;
  float h;
} SigfoxMessage;

// stub for message which will be sent
SigfoxMessage msg;

// =================== UTILITIES ===================
void reboot() {
  NVIC_SystemReset();
  while (1);
}
// =================================================

void setup() {

  scale.set_scale(calibration_factor); //Calibration Factor obtained from first sketch
  scale.tare(); /////////////////////////////////////////

}

void loop() {
  // rajouter les envoi avec heure dans le programme via sigfox interrogation
  dht.begin();
  float t = dht.readTemperature();
  float h = dht.readHumidity();

  Serial.begin(115200);
  delay(100);
  // while (!Serial);

  if (!SigFox.begin()) {
    Serial.println("SigFox error, rebooting");
    reboot();
  }

  // poids.print("poids: ");
  float poids = (scale.get_units()) * 0.453592;
  // poids.print(" kg");
  delay(100); // Wait at least 30ms after first configuration

  // Enable debug prints and LED indication
  SigFox.debug();
  msg.t = (float) (t);
  msg.h = (float) (h);
  msg.poids = (float) (poids);
  Serial.print(msg.poids);

  // Clears all pending interrupts
  SigFox.status();
  delay(1);

  // Send the data
  SigFox.beginPacket();
  SigFox.write((uint8_t*)&msg, sizeof(SigfoxMessage));
  // SigFox.write((uint8_t*)&poids);
  // Serial.print(msg);
  Serial.print("Status: ");
  Serial.println(SigFox.endPacket());

  SigFox.end();
  //Sleep for 60 minutes
  LowPower.sleep(4000000);
  // Normal version
  // delay(5000); // 1000000 = 15 minutes 2000000 = 30 minutes 4000000 = 1 heures

}

HI

Ask here : https://forum.arduino.cc/index.php/board,33.0.html
and read Rules : Règles du forum francophone - Français - Arduino Forum

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.