Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is the light sensor: float getLight(void) { float V_sensor = 1.5 * light_sensor.value(LIGHT_SENSOR_PHOTOSYNTHETIC)/4096; // ^ ADC-12 uses 1.5V_REF float I = V_sensor/100000; // xm1000
This is the light sensor:
float getLight(void) { float V_sensor = 1.5 * light_sensor.value(LIGHT_SENSOR_PHOTOSYNTHETIC)/4096; // ^ ADC-12 uses 1.5V_REF float I = V_sensor/100000; // xm1000 uses 100kohm resistor float light_lx = 0.625*1e6*I*1000; // convert from current to light intensity return light_lx; }
Write a C code that creates a buffer/array of 12 and puts the light values above into the array and prints when its full (when it gets to 12)
Please provide C CODE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started