programming advanced feedback with arduino
play

PROGRAMMING ADVANCED FEEDBACK WITH ARDUINO Part 05 - Led fade and - PowerPoint PPT Presentation

Part 05 - Led fade and change color asynchronously PROGRAMMING ADVANCED FEEDBACK WITH ARDUINO Part 05 - Led fade and change color asynchronously Blocking vs non blocking: _BLOCKING_ Brightness loop() loop() loop() time _ NON


  1. Part 05 - Led fade and change color asynchronously PROGRAMMING 
 ADVANCED FEEDBACK 
 WITH ARDUINO

  2. Part 05 - Led fade and change color asynchronously Blocking vs non blocking: 😓 _BLOCKING_ Brightness loop() loop() loop() time _ NON BLOCKING_ 🤘 Brightness loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() loop() time

  3. Part 05 - Led fade and change color asynchronously Keep track of time without delay() millis() The amount of milliseconds that has passed since last time we reboot the board

  4. Part 05 - Led fade and change color asynchronously Keep track of time without delay() update interval millis() / current time last update time time if ((current time - last update time) > update interval{ ⏰ THE INTERVAL HAS PASSED!!! DO YOUR THING HERE }

  5. Part 05 - Led fade and change color asynchronously CHALLENGE 5: Can you design and code a new animation without using delay? OPTIONS: 1) blink. 2) color fade between colors. 3) blink with irregular intervals. 4) BE CREATIVE! :)

Recommend


More recommend