Professional Documents
Culture Documents
Iot Da Random Moisture
Iot Da Random Moisture
Date: 09.06.2023
Internet of Things
Aim:
To generate random numbers using google colab and insert in thinkspeak IOT channel fields.
Requirements:
Google colab
Thinkspeak IOT
Code:
def MFM384(channel1):
vin=rand.randint(0,50)
i=rand.randint(0,50)
response1=channel1.update({'field1': vin, 'field2':i}) print(response1)
channel1 thingspeak.Channel(id=channelID1, api_key=key1)
while True:
MFM384(channel1)
Rahulganth E N 21BEE0092
Field:
RESULT:
The random Numbers are generated using google colab python code and inserted n the fields in
thinkspeak IOT.
Rahulganth E N 21BEE0092
MOISTURE DETECTER
AIM:
To find the moisture of the environment using moisture sensor with Arduino ide and Arduino esp8266.
Apparatus Required:
Code:
void setup() {
Serial.begin(9600);
}
void loop() {
float moisture_percentage;
moisture_percentage=(100.00-((analogRead(sensor_pin)/1023.00)*100.00) );
Serial.print("Soil Moisture (in percentage) = ");
Serial.print(moisture_percentage);
Serial.print("\n");
delay(1000);
}
Rahulganth E N 21BEE0092
OUTPUT:
RESULT:
By using esp8266 module and moisture sensor the moisture of the room has been calculated.