Question: Write an Arduino code that does the following: Simulates a pendulum swinging back and forth by lighting up Neopixels #0 through #4. You can assume
Write an Arduino code that does the following: Simulates a pendulum swinging back and forth by lighting up Neopixels #0 through #4. You can assume that a pendulum obeys the relationship x(t)=sin(t), with =2 and t denoting time in seconds. You can assume that Neopixel #0 is at x = -1, Neopixel #4 is at x = 1, and equal spacing between the Neopixels. This Arduino function may be useful: https://www.arduino.cc/en/Reference/Millis
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
