wip
This commit is contained in:
parent
9f0929b152
commit
2cdfdb68c5
6 changed files with 13 additions and 5621 deletions
|
@ -49,12 +49,15 @@ const unsigned char* bmpallArray[1] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int mVal;
|
// soil moisture value
|
||||||
int oldmVal =0 ;
|
int soilMoisture;
|
||||||
int tVal;
|
int soilMoistureOld = 0 ;
|
||||||
int oldtVal = 0;
|
// temp value from i2c sensor
|
||||||
int lVal;
|
int temp1Val;
|
||||||
int oldlVal = 0;
|
int temp1ValOld = 0;
|
||||||
|
// light intensity value
|
||||||
|
int lightVal;
|
||||||
|
int lightValOld = 0;
|
||||||
|
|
||||||
void writeI2CRegister8bit(int addr, int value) {
|
void writeI2CRegister8bit(int addr, int value) {
|
||||||
Wire.beginTransmission(addr);
|
Wire.beginTransmission(addr);
|
||||||
|
@ -94,7 +97,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
mVal = readI2CRegister16bit(0x20, 0);
|
soilMoisture = readI2CRegister16bit(0x20, 0);
|
||||||
|
|
||||||
Serial.print(readI2CRegister16bit(0x20, 0)); //read capacitance register
|
Serial.print(readI2CRegister16bit(0x20, 0)); //read capacitance register
|
||||||
Serial.print(", ");
|
Serial.print(", ");
|
||||||
|
@ -108,15 +111,15 @@ void loop() {
|
||||||
|
|
||||||
display.setCursor(73,0);
|
display.setCursor(73,0);
|
||||||
display.setTextColor(SSD1306_BLACK);
|
display.setTextColor(SSD1306_BLACK);
|
||||||
display.print(oldmVal);
|
display.print(soilMoistureOld);
|
||||||
display.display();
|
display.display();
|
||||||
|
|
||||||
delay(800);
|
delay(800);
|
||||||
|
|
||||||
display.setCursor(73,0);
|
display.setCursor(73,0);
|
||||||
display.setTextColor(SSD1306_WHITE);
|
display.setTextColor(SSD1306_WHITE);
|
||||||
display.print(mVal);
|
display.print(soilMoisture);
|
||||||
oldmVal = mVal;
|
soilMoistureOld = soilMoisture;
|
||||||
|
|
||||||
//display.println(readI2CRegister16bit(0x20, 0));
|
//display.println(readI2CRegister16bit(0x20, 0));
|
||||||
display.display();
|
display.display();
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
/home/marcus/Dokumente/git/CanGrow/KiCad/CanGrow/_autosave-CanGrow.kicad_sch
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
||||||
{"hostname":"B550","username":"marcus"}
|
|
|
@ -1 +0,0 @@
|
||||||
{"hostname":"B550","username":"marcus"}
|
|
Loading…
Reference in a new issue