Question: I WILL GIVE THUMBS UP write an arduino code with if else/if/ if else if , statements. edit the given code, to get red and

. Write a modified version of the sketch you created for red yellow green problem 1. Pick two threshold levels identified as L1 and L2 in the diagram to the right. Write the code so that the NeoPixel displays the red when the ambient light level is below Li, displays yellow when the ambient light level is between L1 and L2, and displays green when the ambient L2 light level is above L2. The values of L1 and L2 should be based on the research necessary to 2 void loop() ! int level; int threshold-200; int r=200, g=0, b=0; 11 Value of clear channel from APDS 9960 // Level that determines "dark". 11 Red, green and blue intensity for NeoPixel level = readAmbient Light(); // Get the ambient light level / -- If ambient light level is below the threshold, turn on the NeoPixel. 1/ Otherwise, turn off the NeoPixel. if ( level
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
