0

Trinket HELP
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket HELP

by johnweythek on Wed Nov 20, 2013 11:33 am

Windows 7
1st time trying trinket, trying to make some goggles with 3.3V Trinket and 2 16LCD NeoPixel Rings.
I'm attempting to use regular Arduino IDE OR the trinket 'flavored' one from the tutorial.
USBtinyISP has installed and sees the trinket in device manager, not in the usb section but in its own USBtinyISP section, no error signs there.

So i've got windows 'seeing' the trinket but i can't seem to get a COM port assigned to it, or whatever thing i need to send a sketch to it. Please someone direct me to the super-noob-help, hand-holding edition for this problem as i'll assume i'm the 1000th person asking about it. Sorry i couldn't find my answer elsewhere, I'm overwhelmed with new info.

I recently got all the code working on an UNO which might end up on a long strand of wires with a batt pack in my pocket if the trinket wont do the job; but i have it, so i'd REALLY like to use it. Otherwise the hardware is all wired and everything but placed in the goggles

SO in summation, windows sees the trinket, makes all the right sounds like with usb devices being plugged and unplugged, including when hitting the button for bootloader mode. I've tried timing that with the opening of various programs and updating the ld.exe file for slowing the usb time-outs in both versions of the Arduino IDE. I've gone through the whole tutorial, "Introducing the trinket" twice now but i'm just getting something wrong. Thank you anyone with help.

johnweythek
 
Posts: 33
Joined: Fri Jul 05, 2013 3:22 pm

Re: Trinket HELP

by adafruit_support_rick on Wed Nov 20, 2013 1:14 pm

The Trinket does not emulate a COM port. Use the Trinket flavored version of the IDE and select Trinket as the Board type. The IDE will look for a USBtinyISP instead of a COM port for programming.

Our Trinket Tutorial explains this, and other features of the Trinket:
http://learn.adafruit.com/introducing-t ... troduction

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

Re: Trinket HELP

by johnweythek on Wed Nov 20, 2013 5:18 pm

Ok, tried uploading the example 'Blink' using that method. Well the light IS blinking every second or so but i'm getting constant plugging and unplugging of USB sounds as well. Is this 'blink' just restarting the bootloader or is the IDE doing it because of errors? I used trinket 8MHz and USBtinyISP. I tried 16MHz just BECAUSE and it seems to do the same thing. It's a nice clean install of the trinket friendly IDE.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: The device does not recognize the command.

(expected 4, got -5)

These are the errors, i know it says a few is ok but this is going on and on without end.

Then if i update the avrdude.conf i get this error message:

error at C:\Users\JOHN\Desktop\windows\hardware/tools/avr/etc/avrdude.conf:1524 unrecognized character: "i"

Don't know what that's talking about.

Thank you so much for your help so far. Guess I'm in a little over my head with my 1st permanent arduino project that isn't just sitting on a breadboard. Adafruit rocks! So does the support!

johnweythek
 
Posts: 33
Joined: Fri Jul 05, 2013 3:22 pm

Re: Trinket HELP

by adafruit_support_rick on Thu Nov 21, 2013 11:34 am

Check the FAQ for the avrdude errors:
http://learn.adafruit.com/introducing-trinket/faq

Also, what version of avrdude are you running? You should be on version 5.11.
Open a command window and type avrdude -v. It will show the version. It will also show the path to avrdude.conf.

Here's a link to download v 5.11
http://download.savannah.gnu.org/releas ... -win32.zip

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

Re: Trinket HELP

by johnweythek on Fri Nov 22, 2013 7:38 am

Can i have some more clues on updating AVRDUDE? the exe's in the zip are a no go, like with the usbtinyisp installers for windows 7.

I've already followed the FAQ and said that the -5 instead of 4 error happens after i update avrdude.conf., which is a suggestion for fizing the problem. Should i manually extract the avr update (which i thought was in your flavor of the IDE) into somewhere in the main IDE installer or to the folder with the trinket 'flavored' version?

What console do i type avrdud -v into? Remember i'm in windows 7 so i also don't know where to execute this action (as in what folder and subfolder to run it under, default was C:\Users\John. which gave me nothing.

johnweythek
 
Posts: 33
Joined: Fri Jul 05, 2013 3:22 pm

Re: Trinket HELP

by technobly on Fri Nov 22, 2013 1:16 pm

I'm getting some similar errors in the ArduinoIDE and I've installed the USBtinyISP driver successfully, and followed the guide to install the avrdude.conf file and hardware folder for the ArduinoIDE 1.0.5.

I'm using avrdude v5.11

If I go to a command line and use the default avrdude.conf it connects:
Image

However if I use the avrdude.conf that I downloaded I get this error:
Image

btw I'm using "-C ..\etc\avrdude.conf" to specifically tell avrdude where the config file is because I was getting errors that it couldn't find it. That was my first issue.

My first thought was the way I downloaded the avrdude.conf file might be encoding it differently, but it seems to have the same file size as the previous config file. Is there anyway you could provide a known good avrdude.conf file in a zip file as an attachment here just so I can rule that one out?

Thanks!
Best Regards,
Brett W.
Technobly.com | @Technobly | technobly@gmail.com

technobly
 
Posts: 113
Joined: Mon Oct 31, 2011 11:06 am
Location: Chicago, IL

Re: Trinket HELP

by adafruit_support_rick on Fri Nov 22, 2013 1:48 pm

@johnweythek
Seems like you don't have avrdude registered. Try installing WinAVR first, then update avrdude to 5.11
http://sourceforge.net/projects/winavr/files/
To open a command window, go into the start menu, and in the "Search" box, type cmd, then launch the program that it finds.
@FightCube
I had the same issue. Don't ask me why you and I get this and other people don't. Anyway, I just edited avrdude.conf and deleted that line - it's for some other programmer we don't care about.

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

Re: Trinket HELP

by technobly on Fri Nov 22, 2013 3:58 pm

@rick, I removed lines 1516 through 1632 and avrdude will now connect, however I'm seeing the same verification errors in avrdude as I am with the ArduinoIDE. I'll go over here viewtopic.php?f=52&t=45541 and try those things.
Best Regards,
Brett W.
Technobly.com | @Technobly | technobly@gmail.com

technobly
 
Posts: 113
Joined: Mon Oct 31, 2011 11:06 am
Location: Chicago, IL

Re: Trinket HELP

by MikeBarela on Wed Nov 27, 2013 1:42 pm

The 4, expected -5 error is often seen by those not grtting the timing right on upload. Often though the program does load even though that error is displayed. You can try this with a Blink sketch to see if it is happening.

Try to use the Verify button on your sketch. Then press the Trinket Reset button onboard (no connections to pins 3 & 4 during upload please) and immediately press the upload icon after releasing reset. It takes some practice. You might also check your USB connection.

MikeBarela
 
Posts: 731
Joined: Sat Mar 24, 2012 8:56 pm
Location: Mid-Atlantic

Re: Trinket HELP

by technobly on Wed Nov 27, 2013 2:11 pm

Thanks for the help TheKitty. I ended up solving this by going through the steps here: viewtopic.php?f=52&t=45541 Specifically STEP 5 was the one that fixed everything up :)
Best Regards,
Brett W.
Technobly.com | @Technobly | technobly@gmail.com

technobly
 
Posts: 113
Joined: Mon Oct 31, 2011 11:06 am
Location: Chicago, IL

Re: Trinket HELP

by johnweythek on Fri Nov 29, 2013 9:23 am

I'm glad i could start a discussion, this has been helpful. Been away for holidays but i can't wait to tune the code and get my project together. I'll try any and all suggestions

My blink program 'worked' but the blinking maybe have also been the constant re-entering bootloader mode, so i'm not real clear. Really hope i can get it to work, i'm dying to MAKE something.

Thanks for everyone's input, love this forum so far.

johnweythek
 
Posts: 33
Joined: Fri Jul 05, 2013 3:22 pm

Re: Trinket HELP

by technobly on Fri Nov 29, 2013 11:15 am

The bootloader will pulse the RED LED in and out and a moderately fast rate (it fades in and out). When it's running the blink sketch the rate slows down to 1 second on, 1 second off, no fade. You should notice the pulse rate change right after programming, or potentially up to 10 seconds after a power cycle. Don't forget even if it's programmed it will try to run the bootloader on power up for 10 seconds to give you a change to reprogram it, then it runs the sketch (if one is loaded). Hope that helps.
Best Regards,
Brett W.
Technobly.com | @Technobly | technobly@gmail.com

technobly
 
Posts: 113
Joined: Mon Oct 31, 2011 11:06 am
Location: Chicago, IL

Re: Trinket HELP

by johnweythek on Mon Dec 02, 2013 4:39 pm

So, the red LED is blinking FASTER, but still with a fade, and the bootloader keeps restarting continuously. It's like it WANTS to work, but just can't. A bit like i'm feeling after all this.



avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: A device attached to the system is not functioning.

(expected 4, got -5)
avrdude: verification error, first mismatch at byte 0x0000
0x20 != 0x00
avrdude: verification error; content mismatch

That's the last line(s) of my errors, there are a LOT more of the 4, -5 variety. I dl'd the new WinAVR and got the avrupdate.exe (but it opens and closes so fast i have no idea if it worked) and well that's about it. I def have the usbtiny programmer selected and the correct board. I wanna make my goggles bad, plus i designed some neat snowflake design for the neopixel ring (just look for SNOWFLAKES in the forum under glowy stuff). It's gonna make an awesome xmas tree ornament.

Sorry i don't get back to this sooner, these code and hardware issues wear me out and of course thxgiving weekend sure put a lot of things on pause. THanks everyone for your advice so far. I really do appreciate it, shame there's no simple fix. Once i get over this hurdle though there will be no stopping me, whole house and wardrobe may run on trinkets and UNO's by the time i'm done. I'm sure the dog will enjoy a sparkly xmas sweater with flora leds all over it, you know, before he eats it. Now that i'm rambling i'm going to catch a quick nap. Thanks again everyone.

johnweythek
 
Posts: 33
Joined: Fri Jul 05, 2013 3:22 pm

Re: Trinket HELP

by adafruit_support_rick on Tue Dec 03, 2013 9:50 am

Have you checked out this thread yet?
viewtopic.php?f=52&t=45541

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

Re: Trinket HELP

by johnweythek on Tue Dec 03, 2013 9:02 pm

I tried that updated .exe, it comes up with a command window so fast and disappears i'm not sure anything happens...
I redid arduino back to front all steps with the new files and still have the same faster blink but still repeating bootloader mode.

Of course, windows 7 this time with a Gemma with appropriate settings in the IDE
Got:

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: A device attached to the system is not functioning.

(expected 4, got -5)
avrdude: verification error, first mismatch at byte 0x0000
0x20 != 0x00
avrdude: verification error; content mismatch


USB ports are working, the goggles are put together on an uno atm and wearable (if i lengthen the wires), and the xmas ornament will prob run off of a boarduino if i can't get these micro controllers working. Those were just examples of everythign else working fine, not bragging or anything ;) Commence hair pulling out and battery testing for the goggles, 110mAh for 2 hours of lights, not bad. Anyway, frazzled and off topic. At this point someone might have to join.me or something.

PS - tried the trinket 3V too, same error. Even after changing the delay in avrdude.conf

After changing the delay number i only get one error instead of a long list of them, that's a step in the right direction i think!

johnweythek
 
Posts: 33
Joined: Fri Jul 05, 2013 3:22 pm

Please be positive and constructive with your questions and comments.