/*
sim circuit: partie opérative???
4 LEDs to signal whether below or above range
4 motors to represent the valves for each liquid (water, ph up, ph down, nutrients)
1 ultrasonic sensor to measure water lv in the tank (value will be adjusted manually as well for now)
2 relay modules (for pH and EC) to control the valves/motors
algo:
1. read values (to be entered manually at 1st before receiving them from broker)
2. control valves/pump according to values read:
adjust EC 1st then pH accordingly
EC:
if below range:
LED3 on
switch relay2 to activate motor3 (nutrients)
if above range:
LED4 on
read water lv:
if too low:
signal that water lv is too low (send alarm or sth)
else:
switch relay2 to activate motor4 (water tank)
3. read ph val (after adjusting EC if needed):
if below range:
LED1 on
switch relay1 to activate motor1 (ph up)
if above range:
LED2 on
switch relay1 to activate motor2 (ph down)
*/
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}
Loading
cd74hc4067
cd74hc4067