2020-05-12 09:52:03 +02:00
|
|
|
#ifndef MYDEVICES_H
|
|
|
|
#define MYDEVICES_H
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <thread>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <string.h>
|
2020-05-12 12:33:35 +02:00
|
|
|
#include <fstream>
|
2020-05-12 09:52:03 +02:00
|
|
|
#include "core_simulation.h"
|
|
|
|
|
2020-05-12 11:43:08 +02:00
|
|
|
static int luminosite_environnement = 200;
|
2020-05-12 09:52:03 +02:00
|
|
|
// exemple d'actionneur sur le bus I2C permettant d'echanger des tableaux de caracteres : un ecran, ne pas oublier d'heriter de Device
|
|
|
|
class I2CActuatorScreen : public Device{
|
|
|
|
protected:
|
|
|
|
// memorise l'affichage de l'ecran
|
2020-05-16 17:13:01 +02:00
|
|
|
char buf[I2C_BUFFER_SIZE];
|
2020-05-12 09:52:03 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
// constructeur
|
|
|
|
I2CActuatorScreen ();
|
|
|
|
// thread representant le capteur et permettant de fonctionner independamment de la board
|
|
|
|
virtual void run();
|
|
|
|
};
|
2020-05-12 11:22:59 +02:00
|
|
|
//class ExternalDigitalSensorButton: public Device
|
2020-05-12 09:52:03 +02:00
|
|
|
#endif
|