ESP32 Automated Irrigation Control System Project - PART 3 - The main Sprinkler Class

Описание к видео ESP32 Automated Irrigation Control System Project - PART 3 - The main Sprinkler Class

We now arrive at the third chapter in the series. The first two were dedicated to the development of libraries for hardware needed for the project. With libraries completed for the water meter and the valve we can continue designing the architecture that ties everything together while incoperating the quad relay module into our to be developed sprinklersystem library a small support application will be written along with this activity. It stands to reason our sprinklersystem library and overarching project will depend upon the two libraries created in chapter one and two, they will be included in the library for sprinklersystem and compiled in.


As there is no vectoring in esp32 an array will be created to store zone objects called storedzones, allowing for easy manipulation addition and removal of zones form the sprinklersystem object. the array can handle 30 zones which is way overkill but acceptable. Each zone has attributes that I mad add remove or change later in development, but this will get us off the ground. Attributes from the valve and meter are already defined and probably wont change much.


Within the sprinklersystem class, the overarching object is the class Zone and its attributes, as well as the zone array itself with associated helper functions, open close remove, and whatnot. The is no function to add sprinklersystem the app were creating does that. The addzone function provides an opportunity to allow for any required validation of supplied parameters as demonstrated.


The main program provided is simply a demonstration to create an object and demonstrate all of the functionality thus far. This includes bad data to demonstrate errors.

5 Wire Motorized Ball valve
https://amzn.to/3Tr81yf

Buck Converter
https://amzn.to/3n1WZ6o

Power Transformer 120vac
https://amzn.to/3Jsqg1I

Water Meter
https://amzn.to/42mNRd1

AC/DC Converter
https://amzn.to/3mY6OCx

DPDT Relay
https://amzn.to/3lluL6d

2.4G WiFi Antenna for FPV TX Antenna with RP-SMA Female Cable Dipole Whip
https://amzn.to/3FvAhtI

HiLetgo ILI9341 2.8" SPI TFT LCD Display Touch Panel 240X320 with PCB 5V/3.3V STM32
https://amzn.to/3TqgW3e

Knurled Insert Nuts - 50Pcs M4 x 6mm Length x 6.4mm OD Female
https://amzn.to/3JiCObY

I2C TWI Serial LCD 2004 20x4 Display Module with I2C Interface Adapter Blue Backlight
https://amzn.to/3lmS6oa

HiLetgo ESP-WROOM-32 ESP32 ESP-32S Development Board
https://amzn.to/3Fv4KZ5

Screw Terminal Block Breakout Module Board for ESP32-DevKitC
https://amzn.to/3yLGr5q

2Pin Panel Mount 13mm Waterproof Power Connector IP67
https://amzn.to/3n1DDhH

SP13 6pin Waterproof Aviation Cable Connectors Plug Socket IP67
https://amzn.to/3n3cR8H

360 Degree Rotary Encoder Module KY-040 Brick Sensor
https://amzn.to/3ljdPgD

KUOYUH Circuit Breaker 91 Series 50VDC 125/250VAC (1A-2A) (2.0A)
https://amzn.to/3YQZ42l

5PCS Green AC/DC12-24V LED Indicator Lights
https://amzn.to/3YXiLWl

3pcs PCF8575 IO Expander Board Module I2C to 16IO IIC I2C I/O Extension
https://amzn.to/40f9jhZ

4pcs 2A 5V Charge Discharge Integrated Module 3.7V/4.2V PCB Board Module for 18650 Lithium Battery
https://amzn.to/3yTPkK1

10pcs AMS1117-3.3 DC-DC Step-Down Power Module AMS1117-3.3V Buck Module LDO 800MA
https://amzn.to/3n3JYti

Комментарии

Информация по комментариям в разработке