Arduino Garden

Hello everyone! Let me give you an insight into my project.

Aim of the project:

I’m a student from Portugal, and my project aims to combine technology with agriculture. It all started when we realized that, during the Summer, the [vegetable] gardens we had at school eventually all died.

To counter that we decided it was time to resort to technology to help shore up the botanical part of the equation. That obviously meant learning quite a bit of both areas.

The Project:

The project is a garden controlled by the Arduino, to be installed in my school. With it I intend to enter the Nova University competition. Since this is my first project, I have to tell you don’t know much about electronics, coding and botanics.

Project Details:

I am looking at planting eggplants in a plot of land of around 4m2.

To monitor plant growth and health we need 3 types of sensors (temperature, moisture and luminosity). All of this data is collected by the Arduino which exports it to a website using the ESP module. The Arduino also has the capability to turn the water on when it detects a low water value in the soil.

Because the luminosity sensor is a variable resistor, it will give us an input on the variations in solar light and so how much light are the plants getting. The humidity/moisture sensor is able to tell us changes in resistance, that is, the amount of water present in the soil. Basically, the more water in the soil, the less resistance.

However, some questions need to be answered:

  • how much ground can the sensors cover (+/-)? I was thinking of 1 per 2m2.

  • I can find easily the codes for the sensors on the internet, but I don’t know how to export the data collected to a website, and make graphs everyone can check, plus how can I set up the Arduino?

  • A friend of mine wants to put a simple camera (VGA OV7670) to make a time lapse. The problem is how we can.

We can export the camera data in order to save it (where to?), and how can we stream the data through our website?

  • As I want to make the project 100% energy free, I found 100 monocrystaline cells (52*26mm) for $9
    which are enough for the power consumption (and later to expand the garden). But I will need a battery. For the night time, so how can I make it work, which battery do you guys recommend? I think that 12v are enough for the whole thing.

Since i have a short time, i need to order the pieces as fast as i can.

the pieces i think i will need:

Arduino Mega : http://www.ebay.com/itm/MEGA2560-R3-Board-ATmega2560-16AU-CH340G-Free-USB-Cable-for-Arduino-/261901186104?hash=item3cfa86f438:g:zcQAAOSwkNZUqluP

For the photocell i found the GL5528 and the VT43N1, which is better?

Beadboard + jumpers : http://www.ebay.com/itm/830-Tie-Points-Solderless-PCB-Breadboard-MB102-65Pcs-Jumper-cable-wires-Arduino-/131532407999?hash=item1e9ff144bf:g:UYYAAOSwv0tVdoe1

ESP8266: http://www.ebay.com/itm/ESP8266-Serial-WIFI-Wireless-Transceiver-Module-Send-Receive-LWIP-AP-STA-arduino-/121841140322?hash=item1c5e4c4262:g:OzkAAOSwZ1lWcBvy

VGA camera : http://www.ebay.com/itm/VGA-OV7670-CMOS-Camera-Module-Lens-CMOS-640X480-SCCB-W-I2C-Interface-Arduino-/161333177106?hash=item259034eb12:g:dUsAAOxyCbFTlsHf

LM35 : 5pcs Lm35dz Lm35 To-92 NSC Temperature Sensor IC for sale online | eBay

For the moisture sensor, i know i will face a big problem, the eletrolysis. In order to counter that problem i can use gold plated probes, but they will suffer eletrolysis too. But i found this 2 capacitive sensors :

http://www.ebay.com/itm/Soil-Sensor-Moisture-Capacitive-Sensing-Temperature-for-Arduino-RPi-LED-Type-A-/272160050088?hash=item3f5e00cba8:g:DF4AAOSwstxU84Cf

http://www.ebay.com/itm/3x-PCB-Soil-Sensor-Moisture-Capacitive-Sensing-Temperature-for-Arduino-RPi-/272160050721?hash=item3f5e00ce21:g:GyIAAOSwBLlU84OK

The battery i don't know anything about them, can i use a little LiPo?

They also give better values that the normal sensors, but what about eletrolysis?

If you know better sensors please tell me.

This is my project. I hope I have given you a clear enough idea on how it works, and perhaps how I can answer the questions I need to address.

Thank you for listening to the presentation.

This text was written with the help of my english teacher.

Let me pick some items:

Many (cheap) moisture sensors suffer from electrolysis. That's why they should be driven by AC, so that the surface effects are reverted when polarity changes. IMO contactless (capacitive...) sensors work better, over time, than resistive sensors.

The number of required sensors depends on how evenly the water distributes over the area. The influence of water distribution could become part of your project (research).

Video data cannot be handled by an Arduino. I'd suggest a web cam for that purpose, that includes its own wifi interface for image transmission.

Accumulators (LiPo...) usually require specific circuits for charging, the same for the solar cells. Also the battery charging circuits may not work properly when at the same time current is drawn by other devices. I'm not experienced in that area, cannot give more specific advice :frowning:

Hi,

Thank you for your fast anwser.

Yes, good point the AC is the solution, like take information from the sensors in time to time, for exemple : the sensor is turn on to take a read and then it turns off each 30 minutes right? What about the capacitive you said that they work better, what do you mean? precision? is really that different?

About the are covered by the sensors, i never thought of the water distribution could give me the cover area, and yes thats really good point idea how water influence the readings, its a good topic to add to my project.

So like you said, the arduino cannot handle Video data but if i use a raspberry pi zero, just for the camera do you think that this could work?

hmm seems that the energy is a big problem, but i will investigate more.

About the other pieces, can i order them?

i didn't find better sensors for the temperature or luminosity, but if you know better ones, please tell me.

Thank you.

Hi Nico,
I suggest that you start with the watering part of your project first. For that, you will need some method of controlling the flow of water. If the water comes from the public water supply, you will need (at least one) valves, or if it comes from a water tank, you may need (at least one) pumps.
How much water your garden will need (Ltrs/Hour) will determine the size and type of valve or pump you need.
In the Algarve, where the temperature is high and there will be much evaporation, you will probably need a larger flow of water than in Northern Portugal.
Too much water can be as bad as too little water and some plants are thirstier than others. I'm not a gardener, but I understand that watering at dusk or after dark is better for plants and less wasteful of water.
So your first job is to find out how much water, on a hot day, your garden will need.
I'll leave you to find out how to do that.

I want to make the project 100% energy free

How are you going to power the PC 24/7/365?

AC in moisture sensing means that the polarity of the electrodes is reversed constantly or every other time, so that the electrolytic deposit is removed again. Turning the supply on and off helps to reduce the time, where electrolysis can occur, but when it occurs, the direction is always the same.

No further ideas about your other questions :frowning:

Hi,
Henry_Best, yes i really need some method to control the water flow, and yes the water comes from the public supply so i was thinking of a electric solenoid valve that can be controlled by the arduino, when the moisture sensor detects low water % (for exemple 15%) the arduino sends the signal to the valve to irrigate.

I from lisbon and yes in the summer its like hell in earth, but in the winter its very cold but i still thinks that
my idea for irrigation works works both summer and winter.

To know how much water i need to know how much water my eggplants need, and i found that eggplants need to be frequently irrigated in order to have a wet soil, but too much water may kill the plants. I will need to find how much % is needed to leave the soil wet but for that i need the sensors for testing and to know how much soil im going to use.

I didn't remember that plants are less active at night so will consume less water too, good to remember.

"How are you going to power the PC 24/7/365?" - thats one of my main problems, i think i will need some sort of battery with the solar panels, i found one very good idea that is using an arduino micro with some servos and photocells to track the sun, i want to implement this on my project and compare in terms of energy the solar tracker and non solar tracker and to make some graphs to add to the website, but i still need to investigate a little more.

DrDiettrich, thats seems very hard (at least for me) but could that in addiction to the on and off method resolve the eletrolysis problem?

and one more thing, if you guys have any suggestions and ideas please tell me.

Thank you both.

for the camera.

get any standard digital camera. these are becoming lower and lower cost.
mount it on a post, add a cover to keep out the rain.
you can have the Arduino send a signal to take a picture each day.

you can count hours in software.
and if you measure the light, say it goes from night to brightest daylight
count for 20 hours..... then as soon as the light is bright enough, take a picture.
if the light is not bright enough, take it at 24 or 26 hours

this way, the camera will have about the same amount of light every day. the pictures will be very similar
on cloudy or rainy days you get a picture that would be,... well, different.

when you water, drops form on the leaves. each drop is a magnifying glass and can burn holes in the plants.

plants are living things, have awareness and emotions. getting stung with a thousand needles on a sunny day is not something any living thing enjoys.

drip irrigation is preferred when water is in short supply
you will loose water when you use sprinklers, and water will evaporate with the wind.
at night, the cooler temperature means the humidity is higher, less evaporation
also, the plants can gorge themselves on water.

for cold season growing, a simple greenhouse can be made on the sunny side of the building with a plastic tent. helps keep the building warm too.

You don't have to care about electrolysis when using capacitive moisture sensors, which have fully isolated contacts. See your wish list.

Water can be distributed from buried hoses through small holes. A simple construction for distribution over big areas.

Hi all,
dave, thank you for your comment but the idea was to make a timelapse because we need to make a 6 minutes maximum video where i show my project. I was suggested with the time lapse idea and i really liked it to add on my video, so the photo idea is good but not for what i want, but your idea to take photos is intelligent.
I choose eggplants because they are very well adapted to my clime, they can survive the hole summer and the winter is a little more fragile, and like DrDiettrich said, the water will be distributed by small holes on the hose.

The next step of my project is to make it bigger with different plants and a small greenhouse where i can study how plants behave in different conditions, (no/less co2, etc...) but this is not for now.

DrDiettrich, i found this:

Moisture sensors that measure the resistance or conductivity across the soil matrix between two contacts are essentially junk. First of all, resistance is not a very good indicator of moisture content, because it is highly dependent on a number of factors which might vary from garden to garden including soil ph, dissolved solids in the water, and temperature. Second, most of them are of poor quality with contacts that easily corrode. For the most part you'd be lucky to get one to last through an entire season. Capacitive sensors are generally more accurate because they are just measuring the change in dialetric properties of the soil which is less sensitive to other environmental factors. They also don't require any exposed conductive surfaces which means they can last a bit longer in the harsh environment of your backyard.

what do you think? in the text he said that "can last a bit longer" so they corrode the same way? if they are isolated how they work?

I found this valve:
http://www.ebay.com/itm/12V-1-2-Electric-Solenoid-Valve-Magnetic-DC-N-C-Water-Air-Inlet-Flow-Switch-New-/281748048350?hash=item41997e09de:g:XEIAAOSwT6pVoyj6

I think that is enough, but i still need to know how much ground i will use, right?

And i found different ESP modules, which should i choose?

this one ?: http://www.ebay.com/itm/ESP8266-Esp-12E-Serial-Port-Wireless-WIFI-Transceiver-Board-Module-AP-STA-/262123867975?hash=item3d07cccf47:g:o~AAAOSwniRWNxYt

in this video they have very good results in terms off range, so i dont think the range will be a problem and i dont need that antenna i think.

Tomorrow i take pictures, on the place and everything.

Thank you.

Would be interested to know more about practical diy capacitive moisture sensors, have you thought about buying those you linked to in your opening post ?

That DC solenoid should do ok for mains water pressure up to 8 bar / 0.8Mpa.

While you are talking about working on ground/soil based plants, don't hydroponic methods come into your evaluations as thats very popular with commercial growers ?

Hi all!

since the time is short, i ordered the following components:

For the temmperature sensor: (after i bought it, i found that the capacitive sensor had a tenperature sensor)

For the light sensor:

ESP module:
http://www.ebay.com/itm/ESP8266-Esp-12E-Serial-Port-Wireless-WIFI-Transceiver-Board-Module-AP-STA-/262123867975?hash=item3d07cccf47:g:o~AAAOSwniRWNxYt

The solar cells:

http://www.ebay.com/itm/252335656602

i still need to buy:

the valve:

http://www.ebay.com/itm/12V-1-2-Electric-Solenoid-Valve-Magnetic-DC-N-C-Water-Air-Inlet-Flow-Switch-New-/281748048350?hash=item41997e09de:g:XEIAAOSwT6pVoyj6

The servos for the solar painels, which i don't know the best servos for my project.

The breadboard with jumpers:

and the capacitive moisture sensor:

http://www.ebay.com/itm/3x-PCB-Soil-Sensor-Moisture-Capacitive-Sensing-Temperature-for-Arduino-RPi-/272160050721?hash=item3f5e00ce21:g:GyIAAOSwBLlU84OK

OR

http://www.ebay.com/itm/Soil-Sensor-Moisture-Capacitive-Sensing-Temperature-for-Arduino-RPi-LED-Type-B-/272190575530?hash=item3f5fd293aa:g:eGQAAOSwZjJU84H9

OR

http://www.ebay.com/itm/Soil-Sensor-Moisture-Capacitive-Sensing-Temperature-for-Arduino-RPi-LED-Type-A-/272160050088?hash=item3f5e00cba8:g:DF4AAOSwstxU84Cf

I think this one is the best because is at a good price compared to the others:

http://www.ebay.com/itm/3x-PCB-Soil-Sensor-Moisture-Capacitive-Sensing-Temperature-for-Arduino-RPi-/272160050721?hash=item3f5e00ce21:g:GyIAAOSwBLlU84OK

And the raspberry pi zero and 1080p camera:

http://www.ebay.com/itm/Full-HD-1080P-USB-2-0-Webcam-Web-Cam-Camera-with-Mic-for-PC-Laptops-/281908933255?hash=item41a314f287:g:HPoAAOSwzhVWqDo3

I still have some questions:

For the solar cells i still need to get the flux pen and bus wire right?
How can i calculate how much energy will everything need?
How can i calculate how much soil should i use for 1 moisture sensor?
Can the servos and the solar panel resist to strong wind and hail?

ricky101, yes im planning to buy them tomorrow and yes would be very interesting to learn more about them to add on my report.

So this valve is enought right?

For now i don't want to use hydroponic methods, but im planning to use them as well as aeroponics

the images i took at school: Imgur: The magic of the Internet

what you guys think?

Thank you all.

Hi,

Thats a lot of work to be done with all those parts; are you doing it all yourself or is it a project shared with your other class mates ?

Most of those parts are well covered in the Arduino forum and websites etc, but my suggestion would be to modularize your code and just make a sketch for each function and prove each one 100% before producing a complete solution, theory and practice are two different things .

Regarding that solenoid, I missed your point about it all being solar powered and think it might not be a good choice as I believe they need about 2 amps at 12v to operate, which will be a heavy demand on your solar power /battery.

Instead I would use one of these battery operated valves, either complete or with its timer removed; they use a small DC motor to just open and shut the valve, using no power once opened.
http://www.ebay.co.uk/itm/Automatic-Electronic-Garden-Water-Timer-Irrigation-Plant-Watering-System-New-/351407002173?hash=item51d17d523d:g:nB8AAOSwpdpVXxBB

I'm not convince about the practicality of the low cost moisture sensors so think you will have to do some experimentation with them and also consider a timed release of the water instead ..?

Something I have started to experiment with this season for greenhouse tomotos and cucumbers etc is not to use any mains water on them at all.
Its said that the low temp of mains water on to a warm soil /plant can cause cold shock to the plants and also the chlorine could affect growth.
I'm using two large tubs to hold tap water for at least 24 hours so the chlorine dissipates and the water warms up to greenhouse temp.
Something you could consider for your experiment ..?

Hi,

Theoretically im working with two more guys, but they are just to fill up because i needed to be able to participate.

Yes about the programming of everything, i need to start searching and learning more about porgramm all the different sensors and stuff, but like you said that information is wide spread over internet.

About the solenoid, i thought that too its too much for the solar cells to produce but i really wanted to be controlled by the arduino, is no other way?

About the cold shock, will be a very interesting think to test in the future, but i want to make the garden as i plan after all this.

That water/temp idea is very cool.

I still have lots of things to learn and i will start to learn how i will make the solar panel apparatus and the programming of everything.

DeadlyNico:
About the solenoid, i thought that too its too much for the solar cells to produce but i really wanted to be controlled by the arduino, is no other way?

Any form of solenoid operated water valve is going to need a large current , so your battery and solar panels need to be big enough to handle that load and everything else.

I do not know of any other water valve apart from that motor drive type I showed which I would have thought would be a better low power option, as its just runs on a couple of AAA batteries, so low on current demands.

Do not see why you cannot hack it, removing its electronic timer and running the motor via some transistors from the Uno. It might seem expensive, but it will be a lot cheaper because you will get by with a smaller battery and solar panels

DeadlyNico:
About the solenoid, i thought that too its too much for the solar cells to produce but i really wanted to be controlled by the arduino, is no other way?

you can get electric motorozed valves.

run the motor for 30 seconds. stop, the valve is open, water flows but power does not
then, clsoe teh vavle, motor runs maybe 30 seconds.

total motor time is 60 sweconds (or much less)

if you use a solenoid, it uses power to hold for the entire duration the valve is open.

only you will know, and you will need experiance to determie what would costs less.
as a note, a pair of solenoids on a vale, one to open, one to colose would use about 2 seconds of total power.

Hi guys,
Im in the hospital since thursday with a Myocarditis, and im unable to continue. Hope to get better soon to continue on this project.
For the valve, if my solar cells could generare 12v tor the solenoid, could i use the Arduino to controle the valve?

Ahout the solar energy i found a portuguese project that i fall in love. I will contact him later.

Thank You guys

Whats a young person like you been doing to get an infection like that !!

Yes you will have to hurry up and get better to get the project complete before the growing season really gets going ! :slight_smile:

You can control any solenoid from the Arduino, by using a transistor/mosfet or relay, nothing special or expensive.

If you can get the heavy current for a 12v solenoid from solar then thats ok, but as said, a motorised one will be much lighter on the current.

Hi all again !
Ricky, i dont even know how i got this, i just woke up very bad at night and i went to the hospital. But im 101% now to finish my porject and learn more about arduino.

So you say i can power the solenoid with an an 12v charger and control the valve using arduino and a transitor? that would me amazing if i cound had an option to control the valve from the website, i will investigate more.

About the code, i still don't know some codes but tomorrow i upload all parts i got.
About the site, im looking how im gonna make it, because i don't understand about html or anything related, but i will investigate too.

Thank you all, and yeah i want to finish this is this month.

Hi all,

Sorry for my delay, but in my school they have lots of electronic "garbage" and im taking everything i find
interesting, like cpus, rams, motors from printers, etc..

So far i found this codes:

For the capacitive moisture sensor:

// include 1Wire library
#include <Dp1WBasic.h>
#include <Dp1WDS18xxxTermo.h>
 
// Data wire is plugged into port 5 on the Arduino
#define ONE_WIRE_BUS 5
 
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
Dp1WBasic oneWire(ONE_WIRE_BUS);
 
// Pass our oneWire reference to Dallas Temperature. 
Dp1WDS18xxxTermo tSen(&oneWire);
 
// arrays to hold device address
SensorInfo tempSensors[16];
 
//include CapSense library
#include <CapSense.h>
 
CapSense   cs_7_9 = CapSense(7,9);        // 10M resistor between pins 7 & 9, pin 9 is sensor pin 
CapSense   cs_7_10 = CapSense(7,10);        // 10M resistor between pins 7 & 10, pin 10 is sensor pin
CapSense   cs_7_11 = CapSense(7,11);        // 10M resistor between pins 7 & 11, pin 11 is sensor pin
CapSense   cs_7_12 = CapSense(7,12);        // 10M resistor between pins 7 & 12, pin 12 is sensor pin
 
// set LED pin
byte led1 = 6;
byte led2 = 8;
byte led3 = 13;
 
void setup(void) {
  //   cs_7_9.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example
 
  Serial.begin(9600);
  Serial.println("DpSoilCapTempSensor V 1.0");
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  delay(10000);
}
 
void loop(void) {
 
  byte broj = tSen.readTemperature(tempSensors, 16, NORMAL_SEARCH);
 
  if(broj == 0 ) { 
    Serial.print("\n\nNo 1-Wire Temperature Sensor Found on Digital Pin ");
    Serial.println(ONE_WIRE_BUS);
  } else {
    for(byte i = 0; i < broj; i++) {
      Serial.print("\n\nTemperature sensor ");
      Serial.print(i);
      Serial.println(".");
 
      Serial.print("ROM Address: \t\t");
      for(byte j=0; j<8;j++) {
        if (tempSensors[i].dAddr[j] < 16) Serial.print("0");
        Serial.print(tempSensors[i].dAddr[j], HEX);
      }
 
      Serial.print("\nSensor type: \t\t");
      switch (tempSensors[i].dAddr[0]) {
        case DS18B20MODEL:
  Serial.println("DS18B20");
    break;
        case DS1822MODEL:
  Serial.println("DS1822");
  break;
        case DS18S20MODEL:
  Serial.println("DS18S20/DS1820");
  break;
      }
 
      Serial.print("Actual temperature \t");
      Serial.print(tempSensors[i].dTemperature);
      Serial.print(" C (");
      Serial.print(getResolution(tempSensors[i].dAddr,tempSensors[i].dTempReso),DEC);
      Serial.println(" bit)");
 
      Serial.print("Alarm Low Temperature \t");
      Serial.print(tempSensors[i].dMinAlarm,2);
      Serial.println(" C");
 
      Serial.print("Alarm High Temperature \t");
      Serial.print(tempSensors[i].dMaxAlarm,2);
      Serial.println(" C");
 
      if(i==0) {     
        if(tempSensors[i].dTemperature>28) {
          digitalWrite(led1, HIGH);
        } else {
          digitalWrite(led1, LOW);
        }
      }
      if(i==1) {     
        if(tempSensors[i].dTemperature>28) {
          digitalWrite(led2, HIGH);
        } else {
          digitalWrite(led2, LOW);
        }
      }
      if(i==2) {     
        if(tempSensors[i].dTemperature>28) {
          digitalWrite(led3, HIGH);
        } else {
          digitalWrite(led3, LOW);
        }
      }
 
    }
  }
 
  for(byte j = 0; j <25; j++) {
     long start = millis();
     long total1 =  cs_7_9.capSense(30);
     long total2 =  cs_7_10.capSense(30);
     long total3 =  cs_7_11.capSense(30);
     long total4 =  cs_7_12.capSense(30);
 
     Serial.print(millis() - start);        // check on performance in milliseconds
     Serial.print("\t");                    // tab character for debug windown spacing
 
     Serial.print(total1);                  // print sensor output 1
     Serial.print("\t");
     Serial.print(total2);                  // print sensor output 2
     Serial.print("\t");
     Serial.print(total3);                // print sensor output 3
     Serial.print("\t");
     Serial.println(total4);                // print sensor output 3mit data to serial por
 
     delay(20);
  }
}
 
byte getResolution(uint8_t* deviceAddress, uint8_t conf) {
 
  if (deviceAddress[0] == DS18S20MODEL) return 9; // this model has a fixed resolution
 
  switch (conf) {
    case TEMP_12_BIT:
      return 12;
 
    case TEMP_11_BIT:
      return 11;
 
    case TEMP_10_BIT:
      return 10;
 
    case TEMP_9_BIT:
      return 9;
 
  }
 
  return 0;
}

For the photoresistor;

Connect the photoresistor one leg to pin 0, and pin to +5V
Connect a resistor (around 10k is a good value, higher
values gives higher readings) from pin 0 to GND. (see appendix of arduino notebook page 37 for schematics).

----------------------------------------------------

           PhotoR     10K
 +5    o---/\/\/--.--/\/\/---o GND
                  |
 Pin 0 o-----------

----------------------------------------------------
*/

int lightPin = 0;  //define a pin for Photo resistor
int ledPin=11;     //define a pin for LED

void setup()
{
    Serial.begin(9600);  //Begin serial communcation
    pinMode( ledPin, OUTPUT );
}

void loop()
{
    Serial.println(analogRead(lightPin)); //Write the value of the photoresistor to the serial monitor.
    analogWrite(ledPin, analogRead(lightPin)/4);  //send the value to the ledPin. Depending on value of resistor 
                                                //you have  to divide the value. for example, 
                                                //with a 10k resistor divide the value by 2, for 100k resistor divide by 4.
   delay(10); //short delay for faster response to light.
}

LM35 (ºC sensor):

int pinoSensor = 0;

int valorLido = 0;
float temperatura = 0;

void setup() {
    Serial.begin(9600);
}

void loop() {
    valorLido = analogRead(pinoSensor);
    temperatura = (valorLido * 0.00488);
    temperatura = temperatura * 100;
    Serial.print("Temperatura actual: ");
    Serial.println(temperatura);
    delay(1000);
}

For the wifi module, i can connect to school internet following this tutorial:

and maybe i can work this code to do what i want (from a weather station):