0

trinket 5v avrdude error usbtiny_received (expected 4, got -
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

trinket 5v avrdude error usbtiny_received (expected 4, got -

by hyp3rMC on Fri Aug 11, 2017 8:17 am

Hi there,
I need some help in uploading code to the trinket 5v. I have tried it with arduino IDE but it keeps giving me this message.
arduino_ide_response.jpg
arduino_ide_response.jpg (170.34 KiB) Viewed 621 times


I check with avrdude and it reads the trinket ok from what I can tell...
avrdude_response.jpg
avrdude_response.jpg (63.49 KiB) Viewed 621 times


I can't seem to upload anything on the trinket 5v weather I run on 8 or 16MHz. I have followed through with the learning guide as well as updated avrdude.conf from the guide. trinket green light is on and stable. I press reset as before uploading and the red light blinks as the guide indicates. Here are the settings on my tools in arduino IDE;
board_info.jpg
board_info.jpg (47.01 KiB) Viewed 613 times

I'm at my wits end so if you can please shed a light on this, I would really appreciate it.

Thank you!

hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by hyp3rMC on Fri Aug 11, 2017 8:44 am

I just want to give an update...
uploading a sample hex file from the guide was successful via avrdude. I was able to upload the blink sketch via avrdude with this command: avrdude -c usbtiny -p attiny85 -D -U flash:w:trinketblink.hex
avrdude_blink.jpg
avrdude_blink.jpg (108.88 KiB) Viewed 611 times


Arduino IDE is still no go...
Last edited by hyp3rMC on Fri Aug 11, 2017 8:46 am, edited 1 time in total.

hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by adafruit_support_rick on Fri Aug 11, 2017 8:45 am

That error code simply indicates a retry. Does the sketch work after the upload completes?

adafruit_support_rick
 
Posts: 35054
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by hyp3rMC on Fri Aug 11, 2017 10:28 am

Thank you for the quick reply. No the sketch doesn't work at all.

hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by adafruit_support_rick on Fri Aug 11, 2017 12:24 pm

Go into Arduino Preferences and check off the box for verbose on upload.

Post the entire upload trace here

adafruit_support_rick
 
Posts: 35054
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by hyp3rMC on Fri Aug 11, 2017 12:34 pm

Thank you very much Rick. I will do that tonight once I get home. I will continue to try the upload and will post the output here later. I appreciate it.

hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by sutliff2000 on Sun Mar 04, 2018 5:15 pm

Newbie here.
I am also working on the Kaleidoscope Eyes (Trinket-Powered NeoPixel LED Ring Goggles) and I also am getting the avrdude: error: usbtiny_receive: (expected 4, got -5) error.

I have tried different ports, I've tried different cables. I ensured that I uploaded while the trinket was blinking. I've tried both 8 MHz and 16 MHz. I've made sure the Programmer is set to USBtinyISP.

I have tinkered with breadboards and the Uno Ardino with success, but I don't know what to try next. I've run out of cables and ports.

Any suggestions?

Thanks

sutliff2000
 
Posts: 2
Joined: Sun Mar 04, 2018 5:09 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by hyp3rMC on Mon Mar 05, 2018 12:51 pm

What I found out with dealing with the trinket is that you have to hit the reset button just the right time for the sketch to upload correctly. In my case, I have to hit the reset button a couple of seconds after I clicked on compile and upload in Arduino IDE. Try to experiment with that to see if your sketch uploads. I would also suggest to start with a simple sketch like a blinking LED just to see if it uploads correctly. Once you have that figured out, then you can try your sketch that you want to upload.

That's all I can advise for now. Maybe support will have a better answer if you still can't upload the sketch into the trinket.

hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by sutliff2000 on Tue Mar 06, 2018 10:06 pm

hyp3rMC - thanks for the advice.
I tried it using increasing second intervals. But with no luck. Both with the sketch for the goggles and the basic blink. Same results.
I checked that the port was at com3 and the board and programmer were correct. I'm sad as I was hoping to use this for two other projects once I got this rolling.

Any other insights would be welcome.

Thanks

sutliff2000
 
Posts: 2
Joined: Sun Mar 04, 2018 5:09 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

by hyp3rMC on Thu Mar 08, 2018 5:15 pm

Hmm... I'm not really sure what else would work. Have you tried using avrdude to load a sketch? Of course, the sketch would be in a hex file. I believe the learning center here at adafruit has an example hex file that you can load. Maybe, go back to the trinket tutorial and run through it again just to make sure you're not missing something.
Take a look at this learning guide and see if that would help you debug what is wrong.
https://learn.adafruit.com/introducing-trinket?view=all#programming-with-avrdude

All the best!

hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Please be positive and constructive with your questions and comments.