Istvan Sipka
Published © GPL3+

Weight Cube for Greenhouse

Precise irrigation of paprika by using weight sensors to reach the optimum and required plant growth.

AdvancedShowcase (no instructions)Over 1 day1,993
Weight Cube for Greenhouse

Things used in this project

Hardware components

ESP8266 ESP-12E
Espressif ESP8266 ESP-12E
×1
HX711 Weight Sensor Module
×1
NXP 4-channel I2C-bus switch
×1
STMicroelectronics M24M01 1-Mbit serial I²C EEPROM
×1
Silicon Labs Si7021 - I2C Humidity and temperature sensor
×1
Maxim Integrated DS3231M - I2C Real-Time Clock
×1
DS18B20 Programmable Resolution 1-Wire Digital Thermometer
Maxim Integrated DS18B20 Programmable Resolution 1-Wire Digital Thermometer
×1
I2C 20x4 Character LCD Display
×1
1x3 Membrane Switch Keypad
×1
4P Terminal Block PCB - 2.54 Pitch
×1
5V 1A AC-DC Power Supply
×1
Waterproof Momentary Push Button
×1

Software apps and online services

Arduino IDE
Arduino IDE
ThingSpeak API
ThingSpeak API
Google Sheets
Google Sheets

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Cable glands
Resistors 3K3, 4K7, 10K

Story

Read more

Schematics

weightcube03_35_bb_F02v4TsBYo.png

Code

WeightCube02_35_hackster.ino

Arduino
#include <Wire.h>
#include <AT24CX.h>
#include <LiquidCrystal_I2C.h>
#include "HX711.h"
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Metro.h>
#include "ThingSpeak.h"
#include <TimeLib.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>

// NTP Servers:
static const char ntpServerName[] = "us.pool.ntp.org";
const int timeZone = 1;     // Central European Time
WiFiUDP Udp;
//EthernetUDP Udp;
unsigned int localPort = 8888;  // local port to listen for UDP packets

time_t getNtpTime();
void digitalClockDisplay();
void printDigits(int digits);
void sendNTPpacket(IPAddress &address);

// EEPROM object
AT24CX mem;  // I2C address is 0x50, stored in the .h file

unsigned long myChannelNumber = *****;
const char * myWriteAPIKey = "**************";


const char* ssid = "IoT Cube";        // your network SSID (name:IoT Cube
const char* password = "***********";    // your network password (use for WPA, or use as key for WEP)
WiFiClient  client;

const long ThingspeakDelay = 360000; //msec = 6 minutes=360000msecs
const int senseDelay = 2000; //5 sec=5000msec
const int clockUpdate = 3600;  //3600 sec=1 hour
const int serialTime = 1000; //msec

Metro upload = Metro(ThingspeakDelay);
Metro sense = Metro(senseDelay);
Metro serial = Metro(serialTime);

#define calibration_factor 1188000 //This value is obtained using the SparkFun_HX711_Calibration sketch
#define zero_factor 62750 //This large value is obtained using the SparkFun_HX711_Calibration sketch

#define DOUT  14
#define CLK  13

#define HOMERO 2 //
#define TEMPERATURE_PRECISION 10
OneWire oneWire(HOMERO); // 
DallasTemperature sensors(&oneWire); //

HX711 scale(DOUT, CLK);

int weightReading;           // the current reading from the input pin
const int numReadings = 30;

int readings[numReadings];      // the readings from the analog input
int readIndex = 0;              // the index of the current reading
int total = 0;                  // the running total
int weightAverage = 0;                // the average



// constants won't change. They're used here to set pin numbers:
const int UpPin = 15; 
const int DownPin = 10; 
const int EnterPin = 12; // the number of the pushbutton pin

int WhichScreen =1;   // This variable stores the current Screen number
boolean EnterStateChanged = true;

// variables will change:
int UpState;         // variable for reading the pushbutton status
int DownState;
int EnterState;

int lastUpState = LOW;
int lastDownState = LOW;
int lastEnterState = LOW;

unsigned long lastDebounceTime = 0;  // the last time the output pin was toggled
unsigned long debounceDelay = 50;    // the debounce time; increase if the output flickers


LiquidCrystal_I2C lcd(0x3F,20,4);


#define SIADDR 0x40 // SI7021 I2C address is 0x40
#define LCDADDR 0x3F
#define TCAADDR 0x70
 
void tcaselect(uint8_t i) {
  if (i > 7) return;
 
  Wire.beginTransmission(TCAADDR);
  Wire.write(1 << i);
  Wire.endTransmission();  
}




void setup() //**********************************************************************************
{
  Serial.begin(9600);// Initialise I2C communication as MASTER
  
  //delay(1000);
  pinMode(UpPin, INPUT);
  pinMode(DownPin, INPUT);
  pinMode(EnterPin, INPUT);
  Wire.begin();
  Wire.setClock(32000L); //The slowest i2c speed for nodemcu
  tcaselect(1);
  // Start I2C transmission
  Wire.beginTransmission(SIADDR);
  // Stop I2C transmission
  Wire.endTransmission();
  delay(100);
  tcaselect(0);
  Wire.beginTransmission(LCDADDR);
  Wire.endTransmission();
  delay(100);
  tcaselect(0);
  lcd.begin(20, 4); // initialize the lcd
  lcd.setBacklight(255);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Setting up system");
  Serial.println("Demo of zeroing out a scale from a known value");

  scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch
  scale.set_offset(zero_factor); //Zero out the scale using a previously known zero_factor

  //long zero_factor = scale.read_average(); //Get a baseline reading
  Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.
  Serial.println(zero_factor);
  
  
  
  sensors.begin(); // DS18B20 starts
  sensors.setResolution(TEMPERATURE_PRECISION);
  sensors.requestTemperatures();
  
  delay(500);
  lcd.setCursor(0,1);
  lcd.print("Connecting to WiFi");
  
  WiFi.mode(WIFI_STA);
  WiFi.setPhyMode(WIFI_PHY_MODE_11B); 
  WiFi.begin(ssid, password);
  Serial.print("First attempt to connect to: ");
  Serial.println(ssid);
  delay(500);
  Serial.println(WiFi.status());
  int wifitries = 0;
  
    while (wifitries != 20) {
      delay(500);
      Serial.print(".");
      Serial.print(wifitries);
      wifitries++;
      if(WiFi.status() == WL_CONNECTED){
        wifitries = 20;
      }
      
    }
  
  
  if (WiFi.status() == WL_CONNECTED){
    Serial.println();
    Serial.print("Connected to the network");
    Serial.println();
    
    lcd.setCursor(0,2);
    lcd.print("Connected to:");
    lcd.setCursor(0,3);
    lcd.print(ssid);
    
    printCurrentNet();
    printWiFiData();
    delay(1000);
  }
  else{
    lcd.setCursor(0,3);
    lcd.print("WiFi not reachable");
    Serial.println();
    Serial.print("Network is not available");
  }
  WiFi.printDiag(Serial);
  Serial.println("Starting UDP");
  Udp.begin(localPort);
  Serial.print("Local port: ");
  Serial.println(Udp.localPort());
  Serial.println("waiting for sync");
  setSyncProvider(getNtpTime);
  setSyncInterval(clockUpdate); //time sync interval 1 hour=3600sec
  


  ThingSpeak.begin(client);
  
  

  
  
  upload.reset();
  sense.reset();
  serial.reset();
}

time_t prevDisplay = 0; // when the digital clock was displayed

void loop()  //**************************************************
{
if(WiFi.status() == WL_CONNECTED){
  WiFi.disconnect(true);  // Erases SSID/password
  delay(50);
  Serial.println("WiFi disconnected");  
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
  Serial.println(WiFi.status());
  Serial.println();
}
  
if (EnterStateChanged == true) {
    tcaselect(0);
    lcd.clear();
    lcd.home();
    lcd.noBlink();
    lcd.noCursor();
    }


float rawWeight = (scale.get_units()*100);
float weightInt = rawWeight*1000;
      // subtract the last reading:
      total = total - readings[readIndex];
      // read from the sensor:
      
long Weight = weightInt;
        readings[readIndex] = Weight;
        //Serial.println(tempC);
      
      // add the reading to the total:
      total = total + readings[readIndex];
      // advance to the next position in the array:
      readIndex = readIndex + 1;
    
      // if we're at the end of the array...
      if (readIndex >= numReadings) {
        // ...wrap around to the beginning:
        readIndex = 0;
      }
    
      // calculate the average which is in gramms!!!!
weightAverage = total / numReadings;
      if(serial.check()==1){
      Serial.print(" Reading: ");
      Serial.print(rawWeight,2);
      Serial.print(" kgs"); //Change this to kg and re-adjust the calibration factor if you follow SI units like a sane person
      Serial.print("   AVReading: ");
      Serial.print(" gramms ");
      Serial.print(weightAverage);
      Serial.println();
      digitalClockDisplay();
      }
float tempWeight = weightAverage/1000.000;
      
      tcaselect(0); //select LCD
        //lcd.setCursor(0, 2);
        //lcd.print(rawWeight,2);
        if(WhichScreen==1){
        lcd.setCursor(12, 0);
        lcd.print(tempWeight,2);
        }
      ThingSpeak.setField(1,rawWeight);



switch(WhichScreen) {
  case 1:
    {
      firstScreen();
      
      
      }
      break;
    
    case 2:
     {
        secondScreen();
        screen2();
        
     }
      break;
    
    case 3:
      {
        thirdScreen();
      }
      break;
  }
  // ************************************************************
  
  
  
  //Serial.print("Average weight in GRAMMS: ");
  //Serial.println(weightAverage);
  
  
  
  

  int readUpState = digitalRead(UpPin);
  if (readUpState != lastUpState) {
    lastDebounceTime = millis();}
  if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer than the debounce
    // delay, so take it as the actual current state:
    // if the button state has changed:
    if (readUpState != UpState) {
      UpState = readUpState;
      // only toggle the LED if the new button state is HIGH
      if (UpState == HIGH) {
        Serial.println("UP pushed");
      }
    }
  }
  // save the reading. Next time through the loop, it'll be the lastButtonState:
  lastUpState = readUpState;





  int readDownState = digitalRead(DownPin);
  if (readDownState != lastDownState) {
    lastDebounceTime = millis();}
  if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer than the debounce
    // delay, so take it as the actual current state:
    // if the button state has changed:
    if (readDownState != DownState) {
      DownState = readDownState;
      // only toggle the LED if the new button state is HIGH
      if (DownState == HIGH) {
        Serial.println("DOWN pushed");
      }
    }
  }
  // save the reading. Next time through the loop, it'll be the lastButtonState:
  lastDownState = readDownState;


  

  
  int readEnterState = digitalRead(EnterPin);
  if (readEnterState != lastEnterState) {
    lastDebounceTime = millis();}
    
  if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer than the debounce
    // delay, so take it as the actual current state:
    // if the button state has changed:
    if (readEnterState != EnterState) {
      EnterState = readEnterState;
      // only toggle the LED if the new button state is HIGH
      if (EnterState == HIGH) {
        Serial.println("ENTER pushed");
        EnterStateChanged = true;
        WhichScreen++;
      }
      } else {
        EnterStateChanged = false;
      }
    }
  
  // save the reading. Next time through the loop, it'll be the lastButtonState:
  lastEnterState = readEnterState;

  if (WhichScreen > 3){
    WhichScreen = 1;
  }
  
  
  



  

  
  
  
  

  
  
if (upload.check()== 1){
  lcd.setCursor(19,3); // Column, line
  lcd.print("*");
  
  Hum_Soiltemp_AirtemptoUpload();
    
  Serial.println();
  Serial.println("Connecting to upload data to ThingSpeak Channel: ");
  //WiFi.mode(WIFI_STA);
  //WiFi.disconnect(true);  // Erases SSID/password
  WiFi.begin(ssid, password);
  Serial.print("WiFi status: ");
  Serial.println(WiFi.status());

  int uploadtries = 0;
      while (uploadtries != 20) {
        delay(1000);
        Serial.print(".");
        Serial.print(uploadtries);
        uploadtries++;
        if(WiFi.status() == WL_CONNECTED){
        uploadtries = 20;
        }
     }
      
      
      Serial.println();
      Serial.print("WiFi status: ");
      Serial.println(WiFi.status());
      Serial.println("Uploading data to ThingSpeak");
      
      ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
      Serial.println("DONE!");
      upload.reset();
      
      Serial.println();
      lcd.setCursor(19,3); // Column, line
      lcd.print(" ");
}

if (timeStatus() != timeNotSet) {
    if (now() != prevDisplay) { //update the display only if time has changed
      prevDisplay = now();
      //digitalClockDisplay();
      
    }
  }
}



void firstScreen()
  {
   tcaselect(0); //select LCD
   lcd.home();
   lcd.noBlink();
   lcd.noCursor();
   lcd.setCursor(0,0); // Column, line
   lcd.print("Kozegsuly:");
   lcd.setCursor(18,0);
   lcd.print("Kg");
   
   lcd.setCursor(0,1);
   lcd.print("-");
   lcd.setCursor(3,1);
   lcd.print("ora:");
   lcd.setCursor(13,1);
   lcd.print("|");
   lcd.setCursor(19,1);
   lcd.print("%");
   
   lcd.setCursor(0,2);
   lcd.print("-");
   lcd.setCursor(4,2);
   lcd.print("ora:");
   lcd.setCursor(14,2);
   lcd.print("|");
   lcd.setCursor(19,2);
   lcd.print("%");

   lcd.setCursor(2,3);
   lcd.print("-");
   lcd.setCursor(5,3);
   lcd.print("kozott:");
   lcd.setCursor(19,3);
   lcd.print("%");
   
  }
void secondScreen()
  {
    
    tcaselect(0); //select LCD
    lcd.noBlink();
    lcd.noCursor();
    lcd.setCursor(0,0);
    lcd.print("Kozeg hom.:");
    lcd.setCursor(19,0);
    lcd.print("C");
    lcd.setCursor(0,1);
    lcd.print("Par:");
    lcd.setCursor(8,1);
    lcd.print("% Hom:");
    lcd.setCursor(19,1);
    lcd.print("C");
    lcd.setCursor(0,3);
    lcd.print("Ora:");
    lcd.setCursor(5,3);
    lcd.print(hour());
    lcd.setCursor(7,3);
    lcd.print(":");
    lcd.setCursor(8,3);
    lcd.print(minute());
    
  }
void thirdScreen()
  {
    tcaselect(0); //select LCD
    lcd.noBlink();
    lcd.noCursor();
    lcd.setCursor(1,0); // Column, line
    lcd.print("Beall.1.ertek:");
    lcd.setCursor(1,1); // Column, line
    lcd.print("Beall.2.ertek:");
    lcd.setCursor(1,2); // Column, line
    lcd.print("Beall.3.ert.kezd:");
    lcd.setCursor(1,3); // Column, line
    lcd.print("Beall.3.ert.vege:");
  }


void digitalClockDisplay()
{
  // digital clock display of the time
  Serial.println();
  Serial.print(hour());
  printDigits(minute());
  printDigits(second());
  Serial.print(" ");
  Serial.print(day());
  Serial.print(".");
  Serial.print(month());
  Serial.print(".");
  Serial.print(year());
  Serial.println();
}

void printDigits(int digits)
{
  // utility for digital clock display: prints preceding colon and leading 0
  Serial.print(":");
  if (digits < 10)
    Serial.print('0');
  Serial.print(digits);
}

/*-------- NTP code ----------*/

const int NTP_PACKET_SIZE = 48; // NTP time is in the first 48 bytes of message
byte packetBuffer[NTP_PACKET_SIZE]; //buffer to hold incoming & outgoing packets

time_t getNtpTime()
{
      Serial.println();
      Serial.println("Connecting to update TIME");
      Serial.print("Checking wifi status: ");
      Serial.println(WiFi.status());
      
      WiFi.begin(ssid, password);
      

      int clocktries = 0;
      while (clocktries != 20) {
        delay(500);
        Serial.print(".");
        Serial.print(clocktries);
        clocktries++;
        if(WiFi.status() == WL_CONNECTED){
        clocktries = 20;
        }
     }
      
      
      
      Serial.println();
      Serial.print("Wifi status: ");
      Serial.println(WiFi.status());
  IPAddress ntpServerIP; // NTP server's ip address

  while (Udp.parsePacket() > 0) ; // discard any previously received packets
  Serial.println();
  Serial.println("Transmit NTP Request");
  // get a random server from the pool
  WiFi.hostByName(ntpServerName, ntpServerIP);
  Serial.print(ntpServerName);
  Serial.print(": ");
  Serial.println(ntpServerIP);
  sendNTPpacket(ntpServerIP);
  uint32_t beginWait = millis();
  while (millis() - beginWait < 1500) {
    int size = Udp.parsePacket();
    if (size >= NTP_PACKET_SIZE) {
      Serial.println("Receive NTP Response");
      Udp.read(packetBuffer, NTP_PACKET_SIZE);  // read packet into the buffer
      unsigned long secsSince1900;
      // convert four bytes starting at location 40 to a long integer
      secsSince1900 =  (unsigned long)packetBuffer[40] << 24;
      secsSince1900 |= (unsigned long)packetBuffer[41] << 16;
      secsSince1900 |= (unsigned long)packetBuffer[42] << 8;
      secsSince1900 |= (unsigned long)packetBuffer[43];
      return secsSince1900 - 2208988800UL + timeZone * SECS_PER_HOUR;
    }
  }
  
  Serial.println("No NTP Response :-(");
  return 0; // return 0 if unable to get the time
   
}

// send an NTP request to the time server at the given address
void sendNTPpacket(IPAddress &address)
{
  // set all bytes in the buffer to 0
  memset(packetBuffer, 0, NTP_PACKET_SIZE);
  // Initialize values needed to form NTP request
  // (see URL above for details on the packets)
  packetBuffer[0] = 0b11100011;   // LI, Version, Mode
  packetBuffer[1] = 0;     // Stratum, or type of clock
  packetBuffer[2] = 6;     // Polling Interval
  packetBuffer[3] = 0xEC;  // Peer Clock Precision
  // 8 bytes of zero for Root Delay & Root Dispersion
  packetBuffer[12] = 49;
  packetBuffer[13] = 0x4E;
  packetBuffer[14] = 49;
  packetBuffer[15] = 52;
  // all NTP fields have been given values, now
  // you can send a packet requesting a timestamp:
  Udp.beginPacket(address, 123); //NTP requests are to port 123
  Udp.write(packetBuffer, NTP_PACKET_SIZE);
  Udp.endPacket();
}

Hum_Soiltemp_AirtemptoUpload.ino

Arduino
void Hum_Soiltemp_AirtemptoUpload(){
      
      sensors.requestTemperatures();
      float tempSoil = sensors.getTempCByIndex(0); 
  
      tcaselect(1); // si7021 connected to channel no.1 of the TCA board
      unsigned int datasi[2];
      
      // Start I2C transmission
      Wire.beginTransmission(SIADDR);
      // Send humidity measurement command, NO HOLD MASTER
      Wire.write(0xF5);
      // Stop I2C transmission
      Wire.endTransmission();
      delay(40);
        
      // Request 2 bytes of data
      Wire.requestFrom(SIADDR, 2);
    
      // Read 2 bytes of data
      // humidity msb, humidity lsb 
      if(Wire.available() == 2)
      {
        datasi[0] = Wire.read();
        datasi[1] = Wire.read();
      }
      delay(40);  
      // Convert the data
      float humidity  = ((datasi[0] * 256.0) + datasi[1]);
      humidity = ((125 * humidity) / 65536.0) - 6;
      
    
      // Start I2C transmission
      Wire.beginTransmission(SIADDR);
      // Send temperature measurement command, NO HOLD MASTER
      Wire.write(0xF3);
      // Stop I2C transmission
      Wire.endTransmission();
      delay(40);
        
      // Request 2 bytes of data
      Wire.requestFrom(SIADDR, 2);
      
      // Read 2 bytes of data
      // temp msb, temp lsb
      if(Wire.available() == 2)
      {
        datasi[0] = Wire.read();
        datasi[1] = Wire.read();
      }
      delay(40);
      // Convert the data
      float temp  = ((datasi[0] * 256.00) + datasi[1]);
      float cTemp = ((175.72 * temp) / 65536.00) - 46.85;
    
      ThingSpeak.setField(5,tempSoil);
      ThingSpeak.setField(6,humidity);
      ThingSpeak.setField(7,cTemp);
      
}

screen2.ino

Arduino
void screen2(){        
        
        //sensors.requestTemperatures();
        //float tempSoil = sensors.getTempCByIndex(0); 
    if (sense.check()== 1){
      sensors.requestTemperatures();
      float tempSoil = sensors.getTempCByIndex(0); 
  
      tcaselect(1); // si7021 connected to channel no.1 of the TCA board
      unsigned int datasi[2];
      
      // Start I2C transmission96
      
      Wire.beginTransmission(SIADDR);
      // Send humidity measurement command, NO HOLD MASTER
      Wire.write(0xF5);
      // Stop I2C transmission
      Wire.endTransmission();
      delay(40);
        
      // Request 2 bytes of data
      Wire.requestFrom(SIADDR, 2);
    
      // Read 2 bytes of data
      // humidity msb, humidity lsb 
      if(Wire.available() == 2)
      {
        datasi[0] = Wire.read();
        datasi[1] = Wire.read();
      }
      delay(40);  
      // Convert the data
      float humidity  = ((datasi[0] * 256.0) + datasi[1]);
      humidity = ((125 * humidity) / 65536.0) - 6;
      
    
      // Start I2C transmission
      Wire.beginTransmission(SIADDR);
      // Send temperature measurement command, NO HOLD MASTER
      Wire.write(0xF3);
      // Stop I2C transmission
      Wire.endTransmission();
      delay(40);
        
      // Request 2 bytes of data
      Wire.requestFrom(SIADDR, 2);
      
      // Read 2 bytes of data
      // temp msb, temp lsb
      if(Wire.available() == 2)
      {
        datasi[0] = Wire.read();
        datasi[1] = Wire.read();
      }
      delay(40);
      // Convert the data
      float temp  = ((datasi[0] * 256.00) + datasi[1]);
      float cTemp = ((175.72 * temp) / 65536.00) - 46.85;
    
    
      // Output data to serial monitor
      Serial.print("Relative humidity : ");
      Serial.print(humidity);
      Serial.println(" % RH");
      Serial.print("Temperature in Celsius : ");
      Serial.print(cTemp);
      Serial.println(" C");
      Serial.print("Temperature of soil : ");
      Serial.print(tempSoil);
      Serial.println(" C");
  
      tcaselect(0); //select LCD
  
      lcd.setCursor(5, 1);
      lcd.print(humidity,0);
      lcd.setCursor(14, 1);
      lcd.print(cTemp,1);
      lcd.setCursor(12, 0);
      lcd.print(tempSoil,1);
      //lcd.setCursor(0,0);
      //lcd.print(humidity);
        
    
        /*/ read and write float
      Serial.println();
      mem.writeFloat(1, tempSoil);
      Serial.println("Read float from address 1 ...");
      float f = mem.readFloat(1);
      Serial.print("... read: ");
      Serial.println(f, DEC);
      Serial.println();  */
       
    
      //ThingSpeak.setField(2,tempSoil);
      sense.reset();
        }
}

WiFi_details.ino

Arduino
void printWiFiData() {
  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);
    // print your MAC address:
  byte mac[6];
  WiFi.macAddress(mac);
  Serial.print("MAC address: ");
  Serial.print(mac[5], HEX);
  Serial.print(":");
  Serial.print(mac[4], HEX);
  Serial.print(":");
  Serial.print(mac[3], HEX);
  Serial.print(":");
  Serial.print(mac[2], HEX);
  Serial.print(":");
  Serial.print(mac[1], HEX);
  Serial.print(":");
  Serial.println(mac[0], HEX);

}

void printCurrentNet() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());



  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.println(rssi);

 
}

Credits

Istvan Sipka

Istvan Sipka

4 projects • 33 followers
Heart of an engineer mind of an economist. Actually an entreprenuer at the field of growing sweet pepper. My goal is: IoT for Plants!

Comments