Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
k0xxx committed May 4, 2022
1 parent 8a737f2 commit 6d21822
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ int prValue; // Store value from photoresistor (0-1023)
const int prLaunch = 100; // Value of Photoresistor action

bool inited = false;
bool actionDone = false;

void setup() {
// Photoresistor setup
Expand All @@ -38,15 +37,9 @@ void loop() {
prValue = analogRead(prPin); // Read pResistor

if (prValue < prLaunch){
if(!actionDone){
servoAngle = servoTargetAngle;
actionDone = true;
}
} else {
if(!actionDone){
servoAngle = servoDefaultAngle;
actionDone = true;
}
}

servoControl.write(servoAngle); // tell servo to go to position in variable 'servoAngle'
Expand Down

0 comments on commit 6d21822

Please sign in to comment.