Question: please code this in c++ and using ardunio Problem 4 - Newton's Luminescent Cradle You are a hot shot at a big time company because
please code this in c++ and using ardunio
Problem 4 - Newton's Luminescent Cradle You are a hot shot at a big time company because of all the experience you got from Build Team. You need some trinkets for your desk, but you want them to be unique. You really like the trinket called Newton's Cradle, but being the hot shot you are, the physical device is trivial. You decide to make a Newton's cradle made of LEDs instead. In its resting state an LED on the end of a line of 5 LEDs is illuminated. When a button is pressed and released, analogous to pulling back one of the balls on a normal Newton's Cradle and releasing it, the "light" bounces to each LED and goes back and forth across the 5 LEDs. However, you want it to be very similar to a normal Newton's Cradle and the bouncing stops at some point. Have the "bouncing" of light slow down and eventually stop on one of the LEDs on the end. You can assume that the button will only be pressed if the light is not "bouncing". o Hint: It will be much easier if you store your leds pins in an array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
