element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Save The Bees Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Save The Bees Design Challenge
  • More
  • Cancel
Save The Bees Design Challenge
Blog 04 Blog: "Be the Savior for BEE the Savior" - Software and Final Setup
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Save The Bees Design Challenge to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: walleynp
  • Date Created: 28 Apr 2023 8:30 PM Date Created
  • Views 594 views
  • Likes 4 likes
  • Comments 1 comment
Related
Recommended

04 Blog: "Be the Savior for BEE the Savior" - Software and Final Setup

walleynp
walleynp
28 Apr 2023
04 Blog: "Be the Savior for BEE the Savior" - Software and Final Setup

So now my Arduino MKR Wan start sending data and also ESP32 and LoRa: Ra-02 start taking it with just receiving code. 

image

  • Analysis of honey BeeHive


Here I am going to showcase and discuss the software part and the final project. The Code to send the data using loRa(Ra-02) 433MHz.

  • Monitoring 

image

LoRa Sending Code:

#include <AHT10.h>
#include <Wire.h>
#include <Adafruit_BMP280.h>
#include <SPI.h>
#include <LoRa.h>

int counter = 0;
uint8_t readStatus = 0;

Adafruit_BMP280 bmp; // I2C
AHT10 myAHT20(AHT10_ADDRESS_0X38, AHT20_SENSOR);
byte Node1 = 0x60;

#define SEALEVELPRESSURE_HPA (1013.25)

void setup()
{
  Serial.begin(9600);
 while (!Serial);
 Serial.println("LoRa Sender");
  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
 
  Serial.println();
    bool status;
     if (!bmp.begin()) {
    Serial.println(F("Could not find a valid BMP280 sensor, check wiring!"));
    while (1);
  }
  
  while (myAHT20.begin() != true)
  {
    Serial.println(F("AHT20 not connected or fail to load calibration coefficient")); //(F()) save string to flash & keeps dynamic memory free
    delay(2000);
  }
  Serial.println(F("AHT20 OK"));

}


void loop()
{
  readStatus = myAHT20.readRawData(); //read 6 bytes from AHT20 over I2C
  
  if (readStatus != AHT10_ERROR)
  {
    Serial.print(F("Temp. Super Chamber_Celsius "));Serial.println(myAHT20.readTemperature()); 
    Serial.print(F("AVG. Hive Humidity ")); Serial.println(myAHT20.readHumidity());   
    Serial.print(F("Temp. Breeder_Celsius ")); Serial.println(bmp.readTemperature()); 
    Serial.print(F("Pressure")); Serial.println(bmp.readPressure() / 100.0F);
    Serial.print(F("Approx. Altitude")); Serial.println(bmp.readAltitude(SEALEVELPRESSURE_HPA));
    Serial.println(F("."));

  Serial.print("Sending packet: ");
  Serial.println(counter);
  // send packet
  LoRa.beginPacket();
  LoRa.print(F("Temp. Super Chamber_Celsius "));
  LoRa.print(myAHT20.readTemperature());
   LoRa.print(F("AVG. Hive Humidity "));
  LoRa.print(myAHT20.myAHT20.readHumidity());
   LoRa.print(F("Temp. Breeder_Celsius "));
  LoRa.print(bmp.readTemperature);
   LoRa.print(F("Pressure "));
  LoRa.print(bmp.readPressure() / 100.0F);
   LoRa.print(F("Approx. Altitude "));
  LoRa.print(bmp.readAltitude(SEALEVELPRESSURE_HPA));
  LoRa.print(counter);
  LoRa.endPacket();
  
  }
  else
  {
    Serial.print(F("Failed to read - reset: ")); 
    Serial.println(myAHT20.softReset());         //reset 1-success, 0-failed
  }

  delay(2000); //recomended polling frequency 8sec..30sec
}

Discussion: 

Here we can see the Super Chamber Temperature is higher than Breeder Chamber that means super chamber is getting honey and that's why its warmer and bees are taking care of their larva and cooling down their breeder chamber. no attack occurs. My agenda was to save the bees from "Yellow Jacket" and protect them from miscellaneous condition in practical places.

So, start working to find "Yellow Jacket" detection. 

Previously I told that "I was lucky to find the relevant code for image processing for Nicla vision from examples in OpenMV. So, my task became quite easy."

To work with Nicla vision, we need to install OpenMV which is IDE for that and here is many examples to work. Primitively after install OpenMV, you need to connect Nicla Vision Cam. 

then,  

image

You see this picture and you need to connect it or follow my steps one by one.

 image

Then press connect and you will see the play button become green 

image 

.py program start running. 

 image

I also get my code through example just simple need color code modification. 

During operation I cannot find any "Yellow Jacket" but I tried to show this by internet image simulation of Japanese yellow jacket. 

image

  • Sign in to reply
  • DAB
    DAB over 2 years ago

    Interesting update.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube