LPCSB = Low Power Color Sensing Board
The LPCSB is designed to measure the ambient light in the surrounding area by means of a TCS34725 Color Sensor. The sensor uses four analog-to-digital converters (ADCs) to read four photodiodes (one photodiode per ADC). The photodiodes are red-filtered, green-filtered, blue-filtered, and clear (no filter). The photodiodes are also covered with an IR-blocking filter. The code in the "software" folder of this repository is responsible for initializing all of the hardware on the LPCSB, configuring the settings of the color sensor (integration time, gain, enabling the internal oscillator, enabling the ADCs, and setting a hardware interrupt in the sensor), reading and saving the values taken by the four ADCs mentioned previously, and then calculating the the temperature of each color (how much of each is in the sample taken), as well as the lux (intensity per square meter) of said sample. The measured color temperatures along with the calculated values are broadcast through the BLE radio built into the nrf51822 processor used in this board several times, with new measurements being taken every five seconds.
There is also a data-processing algorithm that is meant to operate on a desktop computer, using a Bluetooth receiver - see thesis for the specific one - to capture the transmitted data from the LPCSB and save it to an Excel spreadsheet. Depending on the version of the algorithm being used, it can also classify the type of light measured by the LPCSB before saving the data to Excel. When running tests with the LPCSB, make sure that the algorithm is running BEFORE activating the LPCSB to avoid errors with the algorithm in its current state.
SIDE NOTE: Make sure that the external crystal oscillator meets the BLE chip requirements for the external clock frequency described in the nrf51822 datasheet. In this case, the required frequency for the external clock is 16 MHz. For some reason, the clock chips that were being used early on were 26 MHz clocks instead of 16 MHz, which WILL cause errors with whichever sections of the processor happen to rely on the external signal (in this case, the BLE Radio parts).