/*
 *Eryoma.h
 * 
 * Popov Vitaliy
 *
 */

#ifndef Eryoma_h
#define Eryoma_h

#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"
#endif 

class Eryoma{
	public:
		Eryoma();
		#define ultrasonic 1
		#define light 2
		#define sound 3
		#define touch 4
		#define encoder 5
		#define arraySensors 6
		
		#define A 101
		#define B 102
		#define C 103
		#define D 104
		
		int sensorRead(byte connector);
		void setSensor(short sensor, byte connector);
		void setMotorSpeed(byte motor, short speed);
		
		short val_arraySensors[8] =  {0,0,0,0,0,0,0,0};
	private:	
		byte Sensors[9] = {0,0,0,0,0,0,0,0,0};
		byte connectorAnalog[9] = {0 ,A0, A1, A2, A3, A4, A5, A6, A7};
		byte connectorDigital[9][3] = {{0,0,0},{19,20,21},{16,15,14},{10,9,8},{13,12,11},{51,52,53},{48,49,50},{45,46,47},{42,43,44}};
		byte val_4051[8][3] = {{0,0,0},{0,0,1},{0,1,0},{0,1,1},{1,0,0},{1,0,1},{1,1,0},{1,1,1}};
};

#endif