From https://mangavalk.com/Hexapod/Hexapod @ 7945005 (its Hexapod_Teensy is identical to the copy already in LEGACY). Earlier electronics generation: on-board IK driving an external SSC-32-style servo controller. Notes on what still applies are in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
401 B
C++
34 lines
401 B
C++
// Version 1
|
|
|
|
#ifndef CustomTimer_H
|
|
#define CustomTimer_H
|
|
|
|
class CustomTimer
|
|
{
|
|
int time;
|
|
boolean start;
|
|
public: CustomTimer()
|
|
{
|
|
start=false;
|
|
}
|
|
public: boolean Delay(int delay)
|
|
{
|
|
if (!start)
|
|
{
|
|
time = millis();
|
|
start = true;
|
|
}
|
|
if (millis() - time >= delay)
|
|
{
|
|
start = false;
|
|
return true;
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
};
|
|
|
|
#endif
|
|
|
|
|