This is an old revision of the document!
This is the simple example of setting brightness of LED using PWM controller.
This hands-on lab guide is intended for the Beginners.
The user needs to know: Basic knowledge of ESP8266 NodeMCU v.2. ESP8266 Arduino programming, Basic knowledge of I2C Interface. Basic knowledge of I2C programming using Arduino I2C library.
All important information including the address of devices is enclosed in the description of the laboratory. In that scenario, the user should write a program in the Arduino platform which turns on and off LEDs for the specified time 15 seconds. The LEDs brightness can be controlled by setting variable “level” from 0 to 4095.
As a result user can control in cameras program execution.
In the beginning, both cameras must show that all LEDs are off. Steps
First load an example project, include appropriate libraries and declare variable ledDriver #include <Wire.h> #include <PCA9685.h>
PCA9685 ledDriver;
Please scan I2C bus and check if PWM controller is present.
Write a programme which:
ledDriver.setLEDDimmed(number,level)
Repeat step 3 ten times.
The only way for validation is to check display by the camera. Both cameras must show that LEDs are changing brightness in given periods of time.