The Arduino Uno and the Arduino Mega2560 are bot using an Atmega16U2 as an USB to serial converter. The default firmware of this microcontroller causes latencies of about 4ms. This project provides a LUFA-based firmware for the Atmega16U2 which does not suffer from this latency issue.
- gcc-avr
- avr-libc
- dfu-programmer
- Download LUFA by running
./getlufa.sh
. - Build firmware by running
make
.
An instruction for flashing the firmware can be found here.
Note: If dfu-prgrammer
is not able to detect the device on Linux, you need
to deactivate auto-suspension of
usb-ports(link).
echo -n -1 > /sys/module/usbcore/parameters/autosuspend