WebUSB LED。硬件、软件和固件。
A USB-controlled LED designed for the WebUSB API.
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
sudo apt-get install gcc-avr binutils-avr gdb-avr avr-libc avrdude. On OS X,
CrossPack works.sudo apt-get install libusb-dev works on
Linux, and brew install libusb libusb-compat works on OS X.sudo apt-get install python-usb on Linux, or sudo pip install pyusb on other platforms.udev to /etc/udev/rules.d/ and then sudo udevadm control --reload-rules.cd firmwaremake factory Now you have a bootloader-ready board with no firmware.make clean uploadThis 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.
cd firmwaremake create_full This clones the firmware of the board you just
built.make factory_mpfirmware directory, make clean upload.Micronucleus done. Thank you!lsusb you should see something like Bus 001 Device 006: ID 1209:a800 InterBiometrics.sudo pip install pyusb==1.0.0.b2./commandline/wlctl 800000 will give you a medium-brightness red
light (it uses CSS-style RGB color format).--help for more options.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.
wlctl in the commandline directory, there is
lswusb, which attempts to parse WebUSB descriptors. This utility
will help you when you're developing your own WebUSB-compatible
device.What is WebUSB? It's a new web standard that makes it easy to write a USB driver once (in JavaScript) and have it work everywhere that WebUSB is supported.
Aren't there already a lot of USB-controlled lights out there? Yes, it's more or less a rite of passage in hobbyist electronics to make some kind of blinking light. The purpose of this project was to design a very simple WebUSB device that might actually be useful.
You said "useful" in the prior answer. Please define that. A WebUSB-enabled light can alert you of interesting things, like a broken continuous build, a service interruption, or yet another crash in the price of bitcoin.
Which board should I build? If you're interested in hacking on
the firmware, build
weblight_developer.brd. This
one has a few more features that make firmware development more convenient. Otherwise if
you just want a device to play with, build
weblight.brd. That
one is more compact, but it requires the ProtoProg ISP adapter, rather than the more common
AVRISP 6-pin adapter. Both designs use 0805 SMT components. Either board can be ordered from OSH Park or Seeed. Note that if you manufacture with a
standard 1.6mm PCB, you'll have to solder the contacts to give them enough thickness to connect. For end-user
boards, 2.0mm or 2.4mm will fit better in USB sockets, and ENIG finish will last longer without tarnishing.
I don't want to build a board, but I'd like one. Will you sell me one? I don't have plans to mass-produce boards for sale. But if you're interested in getting one, subscribe to notifications for this issue.
I remember reading something about Origin Trials. What does that have to do with WebUSB? Chrome 61 and beyond ship with WebUSB, so if your users are running up-to-date Chrome, you're all set! But in case you're curious, the Chrome team has a system called Origin Trials for gathering real developer feedback on provisional APIs. Go to https://bit.ly/OriginTrials to learn more.
暂无开放 Issues,或尚未同步最近议题。