SmartBox-Sortic
SmartFactory
SensorArray Class Reference

The Class SensorArray detects the box fill level. More...

#include <SensorArray.h>

Public Member Functions

 SensorArray (const int Sensor1, const int Sensor2, const int Sensor3, const int LoadIndicatorLED)
 Construct a new Sensor Array object. More...
 
bool getSensorData ()
 Read the Sensor Values. More...
 

Private Attributes

const int pSensor1
 Pin LevelDetector 1. More...
 
const int pSensor2
 Pin LevelDetector 2. More...
 
const int pSensor3
 Pin LevelDetector 3. More...
 
const int pLoadIndicatorLED
 Pin for loadindicator LED. More...
 

Detailed Description

The Class SensorArray detects the box fill level.

Definition at line 27 of file SensorArray.h.

Constructor & Destructor Documentation

◆ SensorArray()

SensorArray::SensorArray ( const int  Sensor1,
const int  Sensor2,
const int  Sensor3,
const int  LoadIndicatorLED 
)

Construct a new Sensor Array object.

Parameters
Sensor1- Pin for LevelDetector 1
Sensor2- Pin for LevelDetector 2
Sensor3- Pin for LevelDetector 3
LoadIndicatorLED- Pin for loadindicator LED

Definition at line 21 of file SensorArray.cpp.

Member Function Documentation

◆ getSensorData()

bool SensorArray::getSensorData ( )

Read the Sensor Values.

Checks for an Element within 0.5-5cm distance from Sensor. If an Elemenet is detectet the sensor will be LOW.

Returns
true Sensor found an Element (full)
false Sensor found no Element (empty)
Todo:
Check multiple times if a Object is present to increase relaiability

Definition at line 34 of file SensorArray.cpp.

Member Data Documentation

◆ pSensor1

const int SensorArray::pSensor1
private

Pin LevelDetector 1.

Definition at line 51 of file SensorArray.h.

◆ pSensor2

const int SensorArray::pSensor2
private

Pin LevelDetector 2.

Definition at line 52 of file SensorArray.h.

◆ pSensor3

const int SensorArray::pSensor3
private

Pin LevelDetector 3.

Definition at line 53 of file SensorArray.h.

◆ pLoadIndicatorLED

const int SensorArray::pLoadIndicatorLED
private

Pin for loadindicator LED.

Definition at line 54 of file SensorArray.h.


The documentation for this class was generated from the following files: