Skip to content

jcrd/arduino-lighten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arduino-lighten

This repo contains the Arduino code for the hardware side of lighten.

Setup

Arduino

The following Arduino libraries are required:

This tutorial explains how to set up the first two.

The TinyUSB library can be installed similarly:

In the Arduino IDE menus, go to Sketch -> Include Library -> Manage Libraries, then search for and install Adafruit TinyUSB.

Now clone the arduino-lighten repo:

git clone https://github.com/jcrd/arduino-lighten.git

Open the arduino-lighten.ino file in the Arduino IDE and upload it to the board.

udev

Appropriate udev rules must be configured to access the HID device.

Create a .rules file in /etc/udev/rules.d that looks like:

SUBSYSTEM=="usb", ATTR{idVendor}=="239a", ATTR{idProduct}=="8111", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
KERNEL=="hidraw*", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="8111", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"

where the idVendor and idProduct attributes reflect the values found using lsusb:

Bus 005 Device 002: ID 239a:8111 Adafruit QT Py ESP32-S2

The sixth column contains the IDs in the format: vendor:product.

See this section of the hidapi Python library documentation for more information.

License

This project is licensed under the MIT License (see LICENSE).

About

Arduino HID light sensor for lighten

Topics

Resources

License

Stars

Watchers

Forks