Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
wiki:projets:rfid:ethylotest:ecran [2015/04/02 10:15] paul12 |
wiki:projets:rfid:ethylotest:ecran [2016/11/13 13:39] (Version actuelle) Vincent Dupuis ↷ Page déplacée de wiki:projets:ethylotest:ecran à wiki:projets:rfid:ethylotest:ecran |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
#include " | #include " | ||
- | *LiquidCrystal lcd(12, | + | LiquidCrystal lcd(12, |
+ | int mq3_analogPin = A0; // connected to the output pin of MQ3 | ||
+ | int mq3_value=0; | ||
+ | void setup() | ||
+ | { | ||
+ | Serial.begin(9600); | ||
+ | lcd.begin(8, | ||
- | *void setup() | + | int mq3_value = 0; |
+ | mq3_value=analogRead(mq3_analogPin); | ||
+ | lcd.write(" | ||
- | *{ | + | } |
- | *lcd.begin(8,2); | + | void loop() { |
+ | lcd.setCursor(0, 1); | ||
+ | mq3_value=analogRead(mq3_analogPin); | ||
+ | lcd.print(mq3_value); | ||
+ | delay(2000); | ||
+ | } | ||
- | *lcd.write(" | + | |
- | *lcd.setCursor(0, 1); | + | |
- | *lcd.print("" | + | |
- | *} | ||
- | |||
- | *void loop() {} |