Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

LUFA (Lightweight USB For AVRs) on the Arduino!

NotificationsYou must be signed in to change notification settings

Palatis/Arduino-Lufa

Repository files navigation

=========================

LUFA (Lightweight USB For AVRs) on the Arduino!

Description

Modern Arduinos (Arduino Leonardo,Arduino Micro,Arduino Esplora,Arduino Lilypad USB, and the UpcomingArduino Tre) came with a ATmega32u4 which have a native USB interface on the MCU. The Arduino IDE also came with a tiny USB stack that has a USB CDC Serial, a Keyboard, and a Mouse. It might be enough if you're migrating old projects (form ATmega168/328's) to the new hardware, but when you want to unleash the full power of it, you'd find that the current implementations lasks extensibility (BADLY!).

Thus, I managed to bring the powerfulLUFA to Arduino!

Installation

As LUFA requires changes to the Arduino core files, it is installed as custom boards.

In the Arduino IDE, go toFile > Preferences, and inAdditional Boards Manager URLs add the following entry :https://github.com/Palatis/Arduino-Lufa/raw/master/package_arduino-lufa_index.json

File > Preferences

Restart Arduino IDE, and you should be able to findArduino LUFA AVR Boards in theTools > Board > Boards Manager

Tools > Board > Boards Manager

Click on install, andArduino LUFA AVR Boards should now appear as a submenu inTools > Board

Tools > Board

Installation (legacy)

While not recommended, it is still possible to use thelegacy installation method.

First run and use

To test Arduino-Lufa, select your board type from theTools > Board > Arduino LUFA AVR Boards, and open theFile > Examples > Exemple for this board > Arduino-LUFA > LUFA_DualVirtualSerial example.

ClickVerify.

(Note: only atmega32u4 based boards are marked as compatible and will appear, if youare using another board which should be compatible please open an issue. Also see Note onUpload below)

File -> Examples -> Examples for this board -> Arduino-LUFA -> LUFA_DualVirtualSerial

To use Arduino-Lufa, select a LUFA board and add#include <LUFA.h> to your sketch header.

Note on uploading the LUFA_DualVirtualSerial sketch

By uploading this sketch to the board, you will prevent the Arduino IDE from automatically reset the board before uploading another sketch. This is normally done by setting up a seial connection with 1200 baud, connecting, then disconnecting.

You can, however, manually reset the board by pressing the hardware reset button when the upload starts. To better see this, enable "Show verbose output during upload" in your preferences and wait until the IDE repatedly prompts something like this:

PORTS {COM1, COM5, COM6, } / {COM1, COM5, COM6, } => {}

If done correctly, the LED on pin 13 will begin flashing and you'll see the upload progressing in the console.

This is not permanent, however. To go back to the original state, upload a sketch compiled without Arduino-Lufa, as explained below.

Deactivating Arduino-Lufa

If you need to compile sketches that use the Arduino Core USB Stack, you'll need to select the board type fromtheTools > Board > Arduino AVR Boards submenu.

Refer tolegacy installation document if you previously installed using the legacy method and wish to deactivate Arduino-Lufa

Credits

Copying

The MIT License (MIT)Copyright (c) 2014, Victor TsengPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE.

About

LUFA (Lightweight USB For AVRs) on the Arduino!

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp