Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop() {
- lastTime = currentTime
- currentTime = micros()
- if (lastTime > currentTime)//if an overflow happened
- {
- if (lastTime % 4 != 0)
- {
- lastTime -= 10001;
- }
- else
- {
- lastTime += 10001;
- currentTime += 10001;
- }
- }
- [code continues on]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement