This project contains open-source firmware for an USB HID Ambient Light Sensor (ALS) implementation using Digispark Attiny85-based microcontroller development board and BH1750FVI I2C light sensor module.
USB HID sensors framework is supported out of the box since Linux 3.7 and Windows 8.
First, please install PlatformIO open source ecosystem for IoT development compatible with Arduino code and its command line tools (Windows, MacOs and Linux). Also, you may need to install git in your system.
Note: with platformIO
you don't need the Arduino IDE and install libraries, this will do it for you.
Clone the project:
git clone https://github.com/3cky/tiny-hid-als && cd tiny-hid-als
Compiling and installing:
pio run --target upload
Note: you need connect your Digispark after each compiling for upload the new firmware or reset it. More info here.
This project is distributed with GPL license, see LICENSE file for more informations.