corridor_control/fan_control
2021-07-25 18:53:58 +03:00
..
.vscode . 2021-06-20 12:57:47 +03:00
data show versions of code and data 2021-07-25 18:47:11 +03:00
include remove random data and related started concept 2021-07-25 18:53:58 +03:00
src remove random data and related started concept 2021-07-25 18:53:58 +03:00
test . 2021-06-20 12:57:47 +03:00
.gitignore . 2021-06-20 12:57:47 +03:00
platformio.ini ota 2021-07-04 22:18:37 +03:00
README.md developing with mini, using non unified dht 2021-06-23 11:49:22 +03:00

Testing platforio and esp

Rationale

I notices that i have to start smaller, make test.

Also, while python was great, the library handling was (really) bad .

Since PlatformIO finally allows to add code to git and share it i chose that over plain Arduino.

And the Basic is such an unbeatable package of esp, power supply, relay and case. Even with ce mark. So here we go...

File structure

This whole directory is a PlatformIO project. Testing . . .

I am not sure what parts are machine specific and thus have to be left out.

Esp

Or to be precise a SonOff Basic v1.3 is the target.

I have this wired with an UNO as a programmer according to https://www.youtube.com/watch?v=qOztsbEfg1g This just bridges the uno and uses its usb chip to pass the programm on. The net says a usb to TTL programmer is the "normal" way, just have not bought one.

Code

The actual code i am trying to write will use the Basic to switch a Fan.

I will add 2 DHT22 in a case like this https://www.thingiverse.com/thing:4852992

The sketch will simply compare temeratures and switch the relay on/off

Development

Turns out the Sonoff Basic has very very little free pins. Maybe just one.

So to use it we will have to use rx/tx for the sensors, which does make Development difficult (no Serial). So i will develop on a D1 Mini that is also a 8266.

OTA is already working and so once debugging is done it "should" just be upload. But i'll make a backdoor to dump serial links to the web interface that i am planning anyway.