Add CustomTimer and separate left/right leg handling
Imported from the unarchived 'hexapod' sketch folder. The real date of this version is unknown; file dates were lost in a 2016-11-14 copy.
This commit is contained in:
1 parent
0447cb8c7a
commit
972ba2cb73
3 files changed
+116
-48
No files matched your search
@@ -0,0 +1,19 @@
|
||||
class CustomTimer
|
||||
{
|
||||
int time;
|
||||
boolean start=true;
|
||||
public boolean delay(int delay)
|
||||
{
|
||||
if (start)
|
||||
{
|
||||
time = millis();
|
||||
start = false;
|
||||
}
|
||||
if (millis() - time >= delay)
|
||||
{
|
||||
start = true;
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user