Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #include <LiquidCrystal_I2C.h>
- int sensorValue = 0;
- int Sensor = 0;
- LiquidCrystal_I2C lcd(0x27, 20, 4);
- void setup()
- {
- lcd.init();
- lcd.backlight();
- Serial.begin(9600);
- }
- void loop()
- {
- // sensorValue = analogRead(A0);
- // Serial.println(sensorValue);
- /**
- map(value, fromLow, fromHigh, toLow, toHigh);
- */
- Sensor = map(analogRead(A0), 0, 1023, 0, 100);
- delay(600);
- lcd.clear();
- lcd.setCursor(5, 0);
- lcd.print(Sensor);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement