OUR IDEAS
Our project aims to monitor temperature and humidity and to detect possible fires in the park, through the Bluetooth communication between the Arduino we have installed and the Nao.
We connected humidity, temperature and CO2 sensors to the Arduino, which we placed in a birdhouse to better camouflage it with nature.
ARDUINO UNO
Main element for the realization of our ideas
SOLAR PANEL
We will use it to power the Arduino in an eco-sustainable way
DHT11 SENSOR
To measure the temperature and humidity of the park of Villa Burba
MQ135 GAS SENSOR
Sensor for measuring air quality.
BLUETOOTH MODULE HC-06
To establish a connection between the Arduino and the Nao
HOUSE FOR ARDUINO
In this pretty little house we will deposit the Arduino with its components
Arduino code for temperature, humidity and air quality sensor, the data is printed in serial and then through an HC-06 ( Bluetooth module, connected to the Smartphone) the data is calculated and made visible on the official app.
Below you will find our Choreographe code for the tour with the Nao
String ricevuto;
int sensorValue;
#include <LiquidCrystal.h>
#include <dht_nonblocking.h>
#define DHT_SENSOR_TYPE DHT_TYPE_11
static const int DHT_SENSOR_PIN = 2;
DHT_nonblocking dht_sensor( DHT_SENSOR_PIN, DHT_SENSOR_TYPE );
void setup( )
{
Serial.begin( 9600);
}
static bool measure_environment( float *temperature, float *humidity )
{
static unsigned long measurement_timestamp = millis( );
if( millis( ) - measurement_timestamp > 3000ul )
{
if( dht_sensor.measure( temperature, humidity ) == true )
{
measurement_timestamp = millis( );
return( true );
}
}
return( false );
}
void loop( )
{
float temperature;
float humidity;
sensorValue = analogRead(0);
if(Serial.available() > 0){
while(Serial.available()){
ricevuto += char(Serial.read());
}
Serial.println(ricevuto);
}
if( measure_environment( &temperature, &humidity ) == true ) {
Serial .print( temperature, 0); Serial.print( humidity, 0); Serial.print(sensorValue, DEC);
}
delay(100);
}
OUR NAO