14
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – Luminance Sensor x1
Crowtail – Cable x1
USB Cable x1
Required Parts
STEP1:
Plug the Crowtail-Base Shield
onto the Arduino or Crowduino Board.
Hardware Connection
STEP2:
Connect Crowtail-Luminance Sensor to
Crowtail-Base shield’s A0 port. The complete
connection is as follows:
Open the
P06_Calculating_Light_Intensity
with Arduino IDE and upload it.
Lesson 6 – Calculating light intensity
Introduction
Crowtail - Luminance Sensor using APDS-9002 as lumens Sensor,
provide the linear transform lumen intensity for the output voltage
levels. And APDS-9002 spectrum and human eye is extremely close
to. It is very suitable for the field of AI applications.
In this lesson, we will use Crowtail-Luminance Sensor to obtain the
light intensity and print it in serial monitor.
We use the analogRead() function to read the value on an analog pin. analogRead() takes one
parameter, the analog pin you want to use, A0 in this case, and returns a number between 0 (0 volts)
and 1023 (5 volts), which is then assigned to the variable sensor_value.
Analog Input: int sensor_value = analogRead(ROTARY_ANGLE_SENSOR);
Unlike void function (), an integer function will return a number after running, and this number is an
integer number. In short, this integer function() will return an integer number each time it is run.
Integer function: int getDegree(){}
Содержание Crowtail
Страница 48: ......