Exercise 5: Kinetis Car Windscreen Wiper with Polling

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exercise 5: Kinetis Car Windscreen Wiper with Polling

Exercise 5: Kinetis Car Windscreen Wiper with Polling

To do:

In this exercise, you realize a windscreen wiper with the Tower. The LEDs simulate the moving wiper by running from left to right and back again.

The user interface is simple: With pushbutton1, the time delay interval is increased in steps of 1 second starting from 5 seconds delay down to 1 second and further to continuous wiping. With pushbutton2 the delay is decreased in the same way.

If the delay is decreased, the wiper should start immediately, because right now there is a need for wiping. This is not true for increasing the delay. In this case, wait till the current delay time is over, set the new delay. In technical terms: Use asynchronous interval reset for decrease and synchronous reset for increase.

Use active wait loops instead of the timer in this Kinetis exercise.

Hint: Have you already switched a case?

Result: TWR_K60_wiper_poll.zip

Attachments
No ratings
Version history
Last update:
‎05-14-2014 08:23 AM
Updated by: