This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
arduino:arduino [2020/07/24 14:53] – tmade | arduino:arduino [2020/11/04 16:11] – [Links] tmade | ||
---|---|---|---|
Line 4: | Line 4: | ||
https:// | https:// | ||
+ | |||
+ | ====esp8266==== | ||
Setup esp8266: | Setup esp8266: | ||
https:// | https:// | ||
+ | |||
+ | ====esp32==== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
==== Irrigation System ==== | ==== Irrigation System ==== | ||
Line 13: | Line 21: | ||
Enhanced code to control a waterpump, a display and an " | Enhanced code to control a waterpump, a display and an " | ||
- | *Display | + | The display |
*Sensor values | *Sensor values | ||
*dry or wet | *dry or wet | ||
*% value | *% value | ||
- | < | + | < |
// | // | ||
//version 1.2 | //version 1.2 | ||
Line 387: | Line 395: | ||
https:// | https:// | ||
+ | |||
+ | To check HEX-adress of your display - which has to be referenced - please run this sketch: | ||
+ | |||
+ | <code sh oled-test.ino> | ||
+ | /********* | ||
+ | Rui Santos | ||
+ | Complete project details at https:// | ||
+ | *********/ | ||
+ | |||
+ | #include < | ||
+ | |||
+ | void setup() { | ||
+ | Wire.begin(); | ||
+ | Serial.begin(115200); | ||
+ | Serial.println(" | ||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | byte error, address; | ||
+ | int nDevices; | ||
+ | Serial.println(" | ||
+ | nDevices = 0; | ||
+ | for(address = 1; address < 127; address++ ) { | ||
+ | Wire.beginTransmission(address); | ||
+ | error = Wire.endTransmission(); | ||
+ | if (error == 0) { | ||
+ | Serial.print(" | ||
+ | if (address< | ||
+ | Serial.print(" | ||
+ | } | ||
+ | Serial.println(address, | ||
+ | nDevices++; | ||
+ | } | ||
+ | else if (error==4) { | ||
+ | Serial.print(" | ||
+ | if (address< | ||
+ | Serial.print(" | ||
+ | } | ||
+ | Serial.println(address, | ||
+ | } | ||
+ | } | ||
+ | if (nDevices == 0) { | ||
+ | Serial.println(" | ||
+ | } | ||
+ | else { | ||
+ | Serial.println(" | ||
+ | } | ||
+ | delay(200); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Note:** You have to change baud rate in serial monitor to " | ||
+ | |||
+ | |||
+ | |||
+ | ====Links==== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// |