This light and proximity sensor detects light over a wide dynamic range (0.01 lux to 64,000 lux) and proximity within a short range of ~5cm.
The LTR-559 is the same sort of sensor that you'd find next to the camera in your phone to detect when it's next to your ear and when your phone should disable the touchscreen.It's ideal for an automatic and manual nightlight switch that detects when ambient light drops below a certain level and automatically tiggers something like Unicorn pHAT to come on, or just wave your hand over it to toggle the light on or off manually using proximity sensing.
The LTR-559 Light and Proximity Sensor Breakout has an I2C interface and is 3.3V or 5V compatible. Like our other Pimoroni breakouts, we've designed it so that you can solder a piece of right-angle header onto it and then pop it straight onto the bottom left 5 pins on your Raspberry Pi's GPIO header (pins 1, 3, 5, 7, 9).
It's also compatible with our fancy new Breakout Garden, where using breakouts is as easy just popping it into one of the six slots and starting to grow your project, create, and code.
We've put together a Python library that you can use to read data from your LTR-559 Light and Proximity Sensor Breakout.You can also use this breakout with Raspberry Pi Pico and other RP2040 boards, using C++ or Pirate brand MicroPython.