1- Le matériel :
Il faut :
– Une carte arduino uno
– Un écran LCD
– Un shield
– 2 câbles Grove
– Un capteur de température Grove 101020015
– Un câble de USB Arduino
2- Le câblage :
Suivez les schémas ci-dessous :

3- Le montage :

Prendre la carte Arduino.

Placer le shield sur la carte Arduino.

Brancher l’écran LCD sur le port I2C.

Brancher sur le port analogique (A0) le capteur de température.

Branché la carte Arduino au pc une fois fini. .
4- Le code :
- Lancer l’application Arduino et crée un nouveau dossier avec le nom de votre choix.
- Récupérer le code en Index et coller le dans la zone de texte de Arduino.
- Dans « OUTILS », sélectionner le port
- Compiler le code via :

7. Téléverser le code via le bouton :

8. Dans le moniteur série :

Sélectionner « 9600 bauds» comme ci-dessous :

9. Après avoir effectuer les étapes ci-dessous, vous pouvez mesurer une température .
5- Index :
#include <rgb_lcd.h> //bibliothéque LCD
#include <Wire.h> //bibliothéque LCD
int second = 0; //initialise les secondes
int minutes = 0; //initialise les minutes
int hour = 0; //initialise les heures
#include <math.h>
const int B = 4275;
const int R0 = 100000; //100K
const int pinTempSensor = A0; //port capteur température
rgb_lcd lcd;
#if defined(ARDUINO_ARCH_AVR)
#define debug Serial
#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM)
#define debug SerialUSB
#else
#define debug Serial
#endif
void setup() {
lcd.begin(16,2);
Serial.begin(9600);
}
void loop() {
if(second<59){
delay(1000);
second++;
Serial.println(String(hour) + " H " + String(minutes) + " minutes " + String(second) + " sec");
}
else{
delay(1000);
minutes++;
second = 0;
if(minutes<60){
delay(1000);
Serial.println(String(hour) + " H " + String(minutes) + " min " + String(second) + " sec");
}
else{
delay(1000);
hour++;
minutes = 0;
}
lcd.setCursor(0,0);
lcd.println(String(hour) + "H " + String(minutes) + "min " + String(second) + "sec ");
}
int a = analogRead(pinTempSensor);
float R = 1023.0/a-1.0;
R = R0*R;
float temperature = 1.0/(log(R/R0)/B+1/298.15)-273.15; // conversion de la température avec datasheet
Serial.print("temperature en = °");
lcd.setCursor(0,0); //écran lcd ligne haut
lcd.println(String(hour) + "H " + String(minutes) + "min " + String(second) + "sec ");
lcd.setCursor(0,1);//écran lcd ligne bas
lcd.println(temperature);
lcd.print(" .C");//affichage de signe degrès
delay(100);
}
I know this web page offers quality depending posts and
extra information,
is there any other website which offers such data in quality?
What’s up everyone, it’s my first go to see at this
website, and article is actually fruitful designed for me, keep
up posting these types of posts.
whoah this weblog is fantastic i really like reading your
articles. Stay up the great work! You understand, many persons are hunting around for this information, you can help them greatly.
Have you ever thought about writing an ebook or guest
authoring on other sites? I have a blog based upon on the same topics you discuss and would love to have you share some stories/information.
I know my viewers would value your work. If you’re even remotely interested, feel free to send me an e-mail.
Hey! I just wanted to ask if you ever have any issues with hackers?
My last blog (wordpress) was hacked and I ended up losing many months of hard work due
to no data backup. Do you have any methods to protect against hackers?
I have been browsing online more than 4 hours today, yet I never found any interesting article like yours.
It is pretty worth enough for me. In my opinion, if all website owners and bloggers made good content as you did, the internet will
be much more useful than ever before.
If you want to get a good deal from this article then you have
to apply these methods to your won web site.
Hi i am kavin, its my first time to commenting anywhere,
when i read this piece of writing i thought i could also make comment due to this good post.