Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to test on non-Teensy platform #6

Open
xoxota99 opened this issue Jan 25, 2018 · 1 comment
Open

Need to test on non-Teensy platform #6

xoxota99 opened this issue Jan 25, 2018 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@xoxota99
Copy link
Owner

No idea what might break if compiling for (e.g.) Uno, nano, or M0.

@xoxota99 xoxota99 added help wanted Extra attention is needed good first issue Good for newcomers labels Jan 25, 2018
@richardFirth
Copy link

richardFirth commented Jan 28, 2018

I have all an uno and a nano, I can test on those once I get the setup built.

something that might cause it not work on different platforms would be different amounts of time between servo refreshes because the time to do the other loop calculations will be different on micros with different speeds.

Perhaps something like this could set the loop speed to be constant across platforms?

void loopTimer()
{
  //The angle calculations are tuned for a loop time of 4 milliseconds. To make sure every loop is exactly 4 milliseconds a wait loop is created by setting the loop_timer variable to +4000 microseconds every loop.

   timingProblem = true;
  while(loop_timer > micros()){
    timingProblem = false; // if the other code takes too long, we never enter the loop.
  }
    loop_timer = micros() + 4000; // 
    digitalWrite(problemLED,timingProblem); // show LED if we exceed the loop time
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants