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() {
checkButton(button1);
checkButton(button2);
//Manual movement by button
manualMoveHandler(button1, blind1);
manualMoveHandler(button2, blind2);
//Read sensor/encoder
readSensor(blind1);
readSensor(blind2);
checkModes(blind1);
checkModes(blind2);
errorCheck(blind1);
errorCheck(blind2);
//Estimate blind position and correct
estimatePosition(blind1);
estimatePosition(blind2);
//Update Motor Driver
updateMotor(blind1, M1);
updateMotor(blind2, M2);
}
int sort_desc(const void *cmp1, const void *cmp2) //compare function for qsort