Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Adafruit_ADS1015.h>
- #include <Wire.h>
- #include <LiquidCrystal_I2C.h>
- LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
- Adafruit_ADS1115 ads1115 (0x48);
- void setup() {
- Serial.begin(9600);
- lcd.begin(16,2);
- ads1115.begin();
- ; }
- void loop() {
- int16_t results;
- results = ads1115.readADC_Differential_0_1();
- lcd.setCursor(0,0);
- lcd.print("Salinity:");
- lcd.setCursor(0,1);
- lcd.print(results);
- delay(50); //delay before looping'
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement