add second blind

This commit is contained in:
interfisch 2021-02-02 20:55:41 +01:00
parent 7529403d6c
commit fe21d1b79f
1 changed files with 7 additions and 0 deletions

View File

@ -178,27 +178,34 @@ void setup() {
void loop() { void loop() {
checkButton(button1); checkButton(button1);
checkButton(button2);
//Manual movement by button //Manual movement by button
manualMoveHandler(button1, blind1); manualMoveHandler(button1, blind1);
manualMoveHandler(button2, blind2);
//Read sensor/encoder //Read sensor/encoder
readSensor(blind1); readSensor(blind1);
readSensor(blind2);
checkModes(blind1); checkModes(blind1);
checkModes(blind2);
errorCheck(blind1); errorCheck(blind1);
errorCheck(blind2);
//Estimate blind position and correct //Estimate blind position and correct
estimatePosition(blind1); estimatePosition(blind1);
estimatePosition(blind2);
//Update Motor Driver //Update Motor Driver
updateMotor(blind1, M1); updateMotor(blind1, M1);
updateMotor(blind2, M2);
} }
int sort_desc(const void *cmp1, const void *cmp2) //compare function for qsort int sort_desc(const void *cmp1, const void *cmp2) //compare function for qsort