gdsports / usb-metamorph

USB Metamorph
MIT License
22 stars 6 forks source link

Question about also outputting data sent to PluggableUSB over a pin, like RX. #1

Open MPardi opened 6 years ago

MPardi commented 6 years ago

Hey, I'm trying to output the data that is sent out the 32u4's USB to that, but also out to a ESP8266 so I can send it to a web server, I was wondering if you knew what changes I could make to accomplish that, I'm super stumped.

Thank you for this great project btw!

gdsports commented 6 years ago

SoftSerial on the ESP8266 might work but I have not had much luck with software serial on the ESP.

You could connect the 32u4 UART Tx to the ESP8266 UART Rx as long as the 32u4 is running at 8MHz 3.3V logic levels. You will need a switch to disconnect the 32u4 whenever you need to upload to the ESP8266.

MPardi commented 6 years ago

Whoops, wasn't thinking about logic levels. I'm plugging the Tx from the 32u4 into my 8266, but I get values like this as-is without modifying:

K,0,0,22,10,0,0,0,0

I'm working from this project because I don't have the USB-host add-on/shield you mention:

USB-Metamorph

It uses a SAMD chip to emulate a USB host, and I can get data out from my 32u4 using the USB port, I just wanted to output it over to a 8266 to see on a web server. I'm going at it in a convoluted way though, but it's more fun like that. :P

Edit: I was thinking, in my infinite cheapness I might attempt a simple voltage divider to bring the 5v logic down to 3.3v, I figured that'd work.