add gpio and finalisation of pinning
This commit is contained in:
@@ -158,6 +158,26 @@ void MovementTask() {
|
||||
}
|
||||
}
|
||||
|
||||
void IoTest()
|
||||
{
|
||||
ESP_LOGI(TAG, "Start IO");
|
||||
InputPort in1(GPIO_NUM_33);
|
||||
InputPort in2(GPIO_NUM_32);
|
||||
InputPort mFault(GPIO_NUM_35);
|
||||
|
||||
OutputPort nEnable(GPIO_NUM_2);
|
||||
OutputPort nReset(GPIO_NUM_5);
|
||||
|
||||
while (true) {
|
||||
ESP_LOGI("Light", "InValues %i %i %i", in1.read(), in2.read(), mFault.read());
|
||||
nEnable.write(true);
|
||||
nReset.write(true);
|
||||
fos::Task::delayMs(500);
|
||||
nEnable.write(false);
|
||||
nReset.write(false);
|
||||
fos::Task::delayMs(500);
|
||||
}
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
@@ -171,4 +191,5 @@ void app_main(void)
|
||||
initialize_ethernet();
|
||||
static fos::Task lightingTask(LightingTask, "Lights", 0x4000uL);
|
||||
static fos::Task movementTask(MovementTask, "Motor", 0x4000uL);
|
||||
static fos::Task ioTask(IoTest, "IO", 0x4000uL);
|
||||
}
|
||||
Reference in New Issue
Block a user