Need help connecting atmega328 directly to usb

Hi everyone!

So I'm working on a homemade vr headset and for what ever reason my arduino serial converter decided it wanted to not work. It stopped awhile ago and I asked a question about on here but I had no replies. So I ended up get a tiny avr programmer which can be used to program any avr with icsp. I use the arduino ide to program it. So when I'm using my attiny85s in can choose the clock speed with the internal oscillator. This goes with the atmega328 as well. I'm running at 8mHz on both. So since I had to use a different bootloader, let alone a usb to serial convertor, I have no serial communication. I need serial communication for my head tracking. If my serial convertor worked I was going to send mouse commands to my computer through the arduino depending on the orientation of my gyroscope sensor.

I've tried using v-usb but I couldn't get it to work at all really. All I need is to send mouse commands. If anyone could send me information on how I could maybe mimic mouse commands/movement through code that would be great. Or if anyone had some coding ideas on how to use one of my attinys as a USB to serial convertor, that would probably be better. That would probably be better anyway but the code would probably be pretty... Big.

Any suggestions on how to get this to work would be greatly appreciated, thanks everyone :slight_smile:

Can you add a USB/Serial module to your design? Like an FTDI Basic module from tinyosshop.com, or MIKROE483 from mouser.com?

I suppose so. I would rather do it with what I have. If I need to do that i will. I just really want to get the project done and yes I am very impatient when I comes to ordering things :stuck_out_tongue:

You can have it fast, working properly, or cheap.

Which two would you like?

kuhny1:
if anyone had some coding ideas on how to use one of my attinys as a USB to serial convertor, that would probably be better.

ive been trying to accomplish that for some years now without a good solution. the problem lies with windows driver issues. hid and libusb (usbasp etc) not too difficult but virtual com port a whole other story. solutions involve kluge workarounds or more sophisticated ics.