52 lines
589 B
C++
52 lines
589 B
C++
#define PIN_TIRETTE 7
|
|
|
|
class Motor;
|
|
|
|
class Caca {
|
|
Caca(int quatitee) : kg(quantitee)
|
|
{}
|
|
|
|
int kg;
|
|
};
|
|
|
|
Caca my_caca {21};
|
|
|
|
class IO {
|
|
public:
|
|
int init()
|
|
{
|
|
pinMode(PIN_TIRETTE, INPUT_PULLUP);
|
|
|
|
for(int i {0}; i < 2; i++)
|
|
{
|
|
motors[i].init();
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
int update()
|
|
{
|
|
bool m_is_tirette_pulled = (digitalRead(PIN_TIRETTE) == LOW);
|
|
|
|
return 0;
|
|
}
|
|
|
|
bool isTirettePulled()
|
|
{
|
|
return m_is_tirette_pulled;
|
|
}
|
|
|
|
private:
|
|
bool m_is_tirette_pulled {false};
|
|
|
|
Motor motors[2];
|
|
};
|
|
|
|
class Motor {
|
|
int init()
|
|
{
|
|
|
|
return 0;
|
|
}
|
|
}; |