Belkacem BENADDA
Created January 11, 2023

HMI for Indoor Hydroponic Machine

With gesture recognition, we want to configure shortcuts for actions adopted in indoor hydroponic culture.

Work in progress25
HMI for Indoor Hydroponic Machine

Things used in this project

Hardware components

Cypress CY8CKIT-148 PSoC 4700S Inductive Sensing Evaluation Kit
Cypress CY8CKIT-148 PSoC 4700S Inductive Sensing Evaluation Kit
×1
pvc tube 160mm x 800mm
×2
PVC 90° 50mm
×3
PVC Reduction 160mm/50mm
×3
PVC 160mm close
×1
PVC 50mm X 420mm
×1
PVC 50mmX200mm
×1
Cypress CY8CKIT-148 Coil
×1

Software apps and online services

PSoC Creator
Cypress PSoC Creator

Story

Read more

Schematics

PSoC4 Design

PDF File

Code

Program

C/C++
/* ========================================
 *
 * Copyright Belkacem BENADDA, 2023
 * All Rights Reserved
 * UNPUBLISHED, LICENSED SOFTWARE.
 *
 * CONFIDENTIAL AND PROPRIETARY INFORMATION
 * WHICH IS THE PROPERTY OF your company.
 * :o{)
 * ========================================
*/
#include <project.h>

uint8 MachineStatus; //is sent throught I2C

int main(void)
{
    MachineStatus = 0x00;
     
    CyGlobalIntEnable; /* I've to figure out why, do componnents need this?   */
    
    PWMTank_Start();
    CTRLHydroponic_Start();
    CTRLHydroponic_ScanAllWidgets();

    for(;;)
    {
        if(CTRLHydroponic_NOT_BUSY == CTRLHydroponic_IsBusy())
        {
            CTRLHydroponic_ProcessAllWidgets();
            CTRLHydroponic_RunTuner();
            if(CTRLHydroponic_IsAnyWidgetActive())
            {
              // set the machine On/OFF      
                if(CTRLHydroponic_IsWidgetActive(CTRLHydroponic_BTNONOFF_WDGT_ID))
                {
                    MachineStatus^=0x01;
                    LEDONOFF_Write(MachineStatus);                        
                }
              //Controle the pump
                if((MachineStatus == 0xFF)&&(CTRLHydroponic_IsWidgetActive(CTRLHydroponic_BTNPUMP_WDGT_ID)))
                {
                    MachineStatus^=0x02;
                    LEDPUMP_Write(MachineStatus);
                }
            }
            
            CTRLHydroponic_ScanAllWidgets();
        }
    }
}

PSoC4 Design

Credits

Belkacem BENADDA

Belkacem BENADDA

5 projects • 1 follower
More than 10 years in education and research on digital signal processing, electronics, hardware and software design of embedded terminals.

Comments