This commit is contained in:
Marcus 2024-03-30 01:30:51 +01:00
parent 9f0929b152
commit 2cdfdb68c5
6 changed files with 13 additions and 5621 deletions

View file

@ -49,12 +49,15 @@ const unsigned char* bmpallArray[1] = {
};
int mVal;
int oldmVal =0 ;
int tVal;
int oldtVal = 0;
int lVal;
int oldlVal = 0;
// soil moisture value
int soilMoisture;
int soilMoistureOld = 0 ;
// temp value from i2c sensor
int temp1Val;
int temp1ValOld = 0;
// light intensity value
int lightVal;
int lightValOld = 0;
void writeI2CRegister8bit(int addr, int value) {
Wire.beginTransmission(addr);
@ -94,7 +97,7 @@ void setup() {
}
void loop() {
mVal = readI2CRegister16bit(0x20, 0);
soilMoisture = readI2CRegister16bit(0x20, 0);
Serial.print(readI2CRegister16bit(0x20, 0)); //read capacitance register
Serial.print(", ");
@ -108,15 +111,15 @@ void loop() {
display.setCursor(73,0);
display.setTextColor(SSD1306_BLACK);
display.print(oldmVal);
display.print(soilMoistureOld);
display.display();
delay(800);
display.setCursor(73,0);
display.setTextColor(SSD1306_WHITE);
display.print(mVal);
oldmVal = mVal;
display.print(soilMoisture);
soilMoistureOld = soilMoisture;
//display.println(readI2CRegister16bit(0x20, 0));
display.display();

View file

@ -1 +0,0 @@
/home/marcus/Dokumente/git/CanGrow/KiCad/CanGrow/_autosave-CanGrow.kicad_sch

File diff suppressed because it is too large Load diff

View file

@ -1 +0,0 @@
{"hostname":"B550","username":"marcus"}

View file

@ -1 +0,0 @@
{"hostname":"B550","username":"marcus"}