Zum Inhalt springen

Usblinky: Unterschied zwischen den Versionen

Overflo (Diskussion | Beiträge)
Overflo (Diskussion | Beiträge)
Zeile 80: Zeile 80:
They speak USB over vUSB but enumerate the device as a usbtiny programmer.
They speak USB over vUSB but enumerate the device as a usbtiny programmer.


The arduino sees a programmer and progremms the ATTINY85 as a target, when it actually overwrites its own FLASH with the user program.
The arduino sees a programmer and programms the ATTINY85 as a target, when it actually overwrites its own FLASH with the user program.


I liked that nifty approach and used the Trinket bootloader when i started this project.
I liked that nifty approach and used the Trinket bootloader when i started this project.


But then i read that adafruit does not wnt you to use their USB ID in a product that you sell.
But then i read that adafruit does not want you to use their USB ID in a product that you sell.


I contacted them but got no meaningful reply, only a standardized answer that i should come back once my product launched.
I contacted them but got no meaningful reply, only a standardized answer that i should come back once my product launched.
Zeile 92: Zeile 92:
Under some special circumstances it can happen that the bootloader falsy triggers and the FLASH on the MCU is damaged and it can not be programmed any more over USB.
Under some special circumstances it can happen that the bootloader falsy triggers and the FLASH on the MCU is damaged and it can not be programmed any more over USB.


It can still be recovered with a dedicated programmer but this was to fragile for my usecase.


===Digispark / micronucleus===
===Digispark / micronucleus===
Zeile 99: Zeile 100:
This bootloader is significantly smaller (2k versus 3.5k) and the code is much more straight forward than the trinket bootloader.
This bootloader is significantly smaller (2k versus 3.5k) and the code is much more straight forward than the trinket bootloader.


The drawback is that you need to modify the arduino environment, but there are packages available for that.
The drawback is that you need to modify the Arduino environment a little more than with the Adafruit Tinket but there are packages available for that.


When I used the usblinky as a BUTTON for the selfiebooth setup I realized that the pinout differs on the trinket.
When I used the usblinky as a BUTTON for the selfiebooth setup I realized that the pinout differs on the trinket.


D+ and D- are switched on the MCU side.
D+ and D- are swapped on the MCU side.


In theory not a big deal, but a lot of libraries that are available for the digispark project (for example the USB keyboard emulation) has this pinout hardcoded and I needed to modify the .cpp files in the Arduino environment to make that work.
In theory not a big deal, but a lot of libraries that are available for the digispark project (for example the USB keyboard emulation) has this pinout hardcoded and I needed to modify the .cpp files in the Arduino environment to make that work.


Future versions of USBlinky have the pins swapped as on the original digispark design.
Future versions of USBlinky have the pins swapped as on the original digispark design.


== Who ==
== Who ==