haustorial/prosthesis_controller.ino

43 lines
621 B
Arduino
Raw Normal View History

2024-09-06 13:33:19 +00:00
#include "definitions.h"
#include "vacuum.h"
#include "servo.h"
void setup() {
Serial.begin(115200);
pinMode(PIN_BUTTON,INPUT_PULLDOWN);
initVacuum();
pinMode(PIN_INPUTARM1,INPUT);
}
void loop() {
unsigned long loopmillis=millis();
bool vac=digitalRead(PIN_BUTTON); //Temporary Vacuum Button
setVacuum(vac);
loopVacuum(loopmillis);
//Print Debug Information
static unsigned long last_print=0;
if (loopmillis - last_print >100) {
last_print=loopmillis;
printVacuumValues();
Serial.print(" Vac="); Serial.print(vac);
Serial.println();
Serial.println();
}
}