Home

Awesome

WebLight

WebLight

A USB-controlled LED designed for the WebUSB API.

Try the web app

Have a WebLight device already?
Launch the web app here:
https://sowbug.github.io/weblight/

What does the javascript look like to write color values?
Check out software/src/weblight-card.html

Developing WebLight Devices

Toolchain/environment setup

Programming a newly built board

Mass-producing boards

This clones the complete firmware from an existing device. For convenience, a relatively stable version of that complete firmware image is already here in the repository (full-[version].hex). If you overwrite it, we'll assume you know what you're doing.

  1. Make one device using the instructions from the previous section.
  2. Unplug from USB and attach to programmer.
  3. cd firmware
  4. make create_full This clones the firmware of the board you just built.
  5. Attach your next board to the programmer.
  6. make factory_mp
  7. Repeat last two steps for all remaining boards.

Development

  1. In the firmware directory, make clean upload.
  2. Plug in the board. After a few moments you should see Micronucleus done. Thank you!
  3. Now the lights on the board should run a startup sequence.
  4. Using lsusb you should see something like Bus 001 Device 006: ID 1209:a800 InterBiometrics.

Usage

  1. Install PyUSB. sudo pip install pyusb==1.0.0.b2
  2. From the base directory of the weblight project, ./commandline/wlctl 800000 will give you a medium-brightness red light (it uses CSS-style RGB color format).
  3. --help for more options.

BOM for production (not developer) circuit

The best results are with an ENIG finish 2.0mm thickness PCB. If you're just prototyping, 1.6mm will work, but you'll want to put some thick solder on the USB leads to bulk them up a bit. Even then, the fit in the USB socket will be loose. ENIG takes longer to wear out than regular HASL.

The board measures 12mm x 41.1734mm x 2.0mm.

Tips

FAQ

Acknowledgments