This is a demo project for the Pmod ALS made by Digilent. The ambient light intensity is measured, converted to an 8-bit number and displayed on the Serial monitor. To control the Pmod, an Arduino UNO is used, which also sends the data to the computer. To communicate with the peripheral device, SPI communication protocol is used, in mode 0, with a serial clock frequency between 1MHz and 4MHz. Data is send in 2 bytes, with 3 leading and 4 trailing zeros, which should be eliminated at processing and is displayed one measurement in a line. The sensor saturates at output value 125.
Using the Pmod ALS with Arduino Uno
Application notes for Pmod ALS and Arduino Uno. In this app, the value of the amount of light is displayed on the serial monitor.
Thanks to Lextronics.