cleanup main.cpp, split platform code into a Platform object
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
#include "./Buttons.h"
|
||||
#include "../Static.h"
|
||||
|
||||
void
|
||||
Buttons::onStart()
|
||||
{
|
||||
for(int i = 0; i < 3; i++) {
|
||||
//Log.info("Bound pin %d to button %d", 2 + i, i);
|
||||
m_buttons[i].attach(2 + i, INPUT_PULLDOWN);
|
||||
//m_buttons[i].attach(2 + i, INPUT_PULLDOWN);
|
||||
m_buttons[i].attach(2 + i, INPUT_PULLUP);
|
||||
m_buttons[i].interval(15);
|
||||
}
|
||||
}
|
||||
@@ -35,3 +37,5 @@ Buttons::read()
|
||||
}
|
||||
return InputEvent{};
|
||||
}
|
||||
|
||||
STATIC_ALLOC(Buttons);
|
||||
|
Reference in New Issue
Block a user