Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gdsports/cdcarduino_uhs2
USB CDC ACM Arduino board library for use with the USB Host Shield 2.0 library
https://github.com/gdsports/cdcarduino_uhs2
arduino cdc-acm esp8266 usb-host usb-host-shield wifi
Last synced: 11 days ago
JSON representation
USB CDC ACM Arduino board library for use with the USB Host Shield 2.0 library
- Host: GitHub
- URL: https://github.com/gdsports/cdcarduino_uhs2
- Owner: gdsports
- License: mit
- Created: 2019-09-15T03:13:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-17T01:12:27.000Z (over 5 years ago)
- Last Synced: 2024-11-13T22:33:21.823Z (2 months ago)
- Topics: arduino, cdc-acm, esp8266, usb-host, usb-host-shield, wifi
- Language: C++
- Size: 457 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CDC Arduino for USB Host Shield 2.0 Library
The cdcarduino library provides support for Arduino USB CDC ACM boards such as
the Uno and Mega 2560. The library detects Arduino boards based on their USB
Vendor ID and Product ID. Methods to reset (DTR and RTS) boards are provided to
force the boards to run their bootloaders for Flash burning. This will not work
with clone boards using CH340, CP210x, or other USB serial chips. The boards
must have the Arduino USB Vendor IDs and Product IDs. This may also not work if
boards are running non-standard bootloaders. Testing has been done only on
genuine Arduino Uno and Mega 2560 boards running factory installed bootloaders.## Example: esplinkusb
TCP transparent bridge to Arduino board via USB port. This program provides
firmware update functionality similar to
[esp-link](https://github.com/jeelabs/esp-link) but through the Arduino board
USB port without connecting wires to UART pins. A USB Host mini board and the
USB Host Shield 2.0 library are required to connect the Arduino board to the
ESP. This program provides the minimum features to use avrdude with its -Pnet:
network option to upload HEX files to an attached Uno or Mega 2560 over WiFi.`Uno -USB- USB Host mini -SPI- ESP8266 -WiFi- avrdude -Pnet::2323`
The program listens for TCP connections on port 23 and 2323. Connections on
port 2323 reset the attached board so it is ready for Flash burning. Use
avrdude with this port.Connections on port 23 do not reset the board can be used to access the serial
console without disturbing the board. Use telnet or a similar program.The program uses [WiFiManager](https://github.com/tzapu/WiFiManager) so the
SSID and password can be configured without changing the source code.avresplink is a BASH shell script that runs avrdude with the correct parameters
depending on the board. This can be used with this program as well as with
esp-link.`$ avresplink 192.168.x.y Blink.ino.standard.hex`
This will run avrdude with the following parameters. The parameters that are
the same for all boards are not shown.```
-patmega328p
-carduino
-Pnet:192.168.x.y:2323
-Uflash:w:Blink.ino.standard.hex:i
````$ avresplink 192.168.x.y Blink.ino.mega.hex`
This will run avrdude with the following parameters. The parameters that are
the same for all boards are not shown.```
-patmega2560
-cwiring
-Pnet:192.168.x.y:2323
-Uflash:w:Blink.ino.mega.hex:i
```## Hardware Example
![NodeMCU 1.0 and USB host mini boards](images/cdcarduino.jpg)
* [NodeMCU devkit 1.0 board](https://github.com/nodemcu/nodemcu-devkit-v1.0)
* [USB host mini board](https://chome.nerpa.tech/usb-host-shield-hardware-manual/)See the USB Host Shield Hardware Manual to see how to change VBUS from 3.3V to 5V.
A trace must be cut.|Power |NodeMCU |USB host mini
|--------|---------------|-------------
|5V |VIN |VBUS (cut trace)
|GND |GND |GND
| |3V3 |VCC
| |D1,#5 |INT
| |D5,#14,HSCLK |CLK
| |D6,#12,HMISO |MISO
| |D7,#13,HMOSI |MOSI
| |D8,#15,HCS |SS
| | |MAX_RST (pullup resistor to 3V3)