#pragma once
#include <Arduino.h>

class CUltrasonicSR04
{
	private:
	void Init(int pinout, int pinecho[], int pincount); 
	int PinOut;							   //out pin
	int *PinEcho;						   //echo pin list
	int PinCount;					       //number of el
	//
	public:
	//initialisation class HCSR04 (trig pin , echo pin)
	CUltrasonicSR04(int out, int echo);				
	//initialisation class HCSR04 (trig pin , echo pin) - sequence
	CUltrasonicSR04(int out, int echo[], int n); 	
	//destructor
	~CUltrasonicSR04();					
	// Open/Close
	void Open(void);
	void Close(void);			
	//return curent distance of element 0
	float GetDistance() const;
	//return curent distance of element n
	float GetDistance(int n) const;					
};
