Today i was writing a program for my Mystical Agriculture Farm.
The program is supposed to steer the Robot in random directions and check the Robot's energy after each cycle.
After a certain threshold (now 10%) is reached, it sends the robot to a charger.
The energy check and recharging works like a charm, but as soon as i add the while-loop and the random movements, i get a "too long without yielding" error (the full error is pasted at the end of the github file).
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Today i was writing a program for my Mystical Agriculture Farm.
The program is supposed to steer the Robot in random directions and check the Robot's energy after each cycle.
After a certain threshold (now 10%) is reached, it sends the robot to a charger.
The energy check and recharging works like a charm, but as soon as i add the while-loop and the random movements, i get a "too long without yielding" error (the full error is pasted at the end of the github file).
github: The Code
Link to post
Share on other sites