Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions