0

Trinket first effort problem
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket first effort problem

by Merkelck on Mon Oct 01, 2018 5:13 pm

My initial effort with the Trinket has not gone well and I could use some help. The sketch I am using works fine on a Metro Mini. But I need to get it into a small package for the final device. I am using the Arduino 1.8.7 with the updates from Adafruit for the devices. The computer is running win10pro. The sketch will verify with no errors but it will not compile correctly. The error results are in the attached file "trinket_fail04.rtf" I have run several of the simple sketches from the Example tab and they work fine. I have made sure the pin that I am trying to use works and it seems to. I have perused the Adafruit pages regarding this device and I think I have things working right. One concern I have is regarding the time that the bootloader runs may not be sufficient for the sketch I am using . The system reports that it is using 85% of the devices capability. The led device is a Jewel.
Two files have been uploaded.
trinket_fail02.rtf
CD77_Candle_Effect_7.ino

Any and all ideas appreciated
KentM
Attachments
CD77_Candle_Effect_7.ino
Sketch used
(4.42 KiB) Downloaded 74 times
trinket_fail04.pdf
Error message
(254.79 KiB) Downloaded 51 times

Merkelck
 
Posts: 40
Joined: Mon Jan 22, 2018 10:55 pm

Re: Trinket first effort problem

by adafruit_support_mike on Tue Oct 02, 2018 2:46 am

It looks like the bootloader isn't running at the moment the Arduino IDE wants to upload the firmware.

Getting the timing on that right can be a challenge, but tends to be repeatable. Once you find the timing that works, it tends to keep working and hitting the window gets easier.

As a secondary issue, verify your USB cable by using it to connect some other, known-working device to the computer. There's a plague of charge-only cables out there with USB connectors at both ends but no wires for the data signals. We see people get caught by them every day, and it's become normal for people to say they had to try three or four cables before finding one that would work.

adafruit_support_mike
 
Posts: 59421
Joined: Thu Feb 11, 2010 2:51 pm

Re: Trinket first effort problem

by Merkelck on Tue Oct 02, 2018 7:38 am

Thanks for the reply. I was hoping you would find some earth shattering thing that I was doing wrong. I don't think the cable is the problem as I use that cable for other devices but a different cable is certainly easy to try. I do find different results between when I switch to the older modified version of the IDE 1.0.5 other than the latest 1.8.7. But my efforts to repeat a simple sketch (BLINK) are not always repeatable. There are definitely two different audio response to the connect/disconnect of the USB cable and they are easily identifiable when pushing the reset switch on the trinket. I try to hit the upload button at the right time.
But I do know everything works well with the metro mini so I may just switch to that
Thanks again
Kentm

Merkelck
 
Posts: 40
Joined: Mon Jan 22, 2018 10:55 pm

Re: Trinket first effort problem

by Merkelck on Wed Oct 03, 2018 11:18 pm

I have tried everything I know how to do and I still can't get the trinket to work. I started with this thing on the RPi but gave up on that right away. I moved to one of my Win10 machines and tried that one using the current Arduino 1.8.7. It was here that I learned that the windows version has a different number 1.8.15.0 I updated the preferences with the adafruit board manager and then made that correction in the IDE. But I was not successful in getting the trinket to work with even the simplest sktech. I tried several usb cables with the same results. I also tried a usb hub to alleviate possible USB 3 problems. I then switched to a different win10 machine (same version/processor) I performed all the same setup items that I found in the adafruit learning page regarding this device. Then I came across the special Adafruit IDE 1.0.5. I got very different and positive results using this IDE but it is quite clunky compared to the latest windows version. But I was able to select the trinket 5v 8mhz version and I got it to work great with a couple of simple sketches. However, when I tried to run the sketch that I want to use in my project , that was a disaster. This time the problem seems to be file location problems. The adafruit 1.0.5 file structure did not contain the FastLED folder. So I moved the folder from the other location to this one but no luck.
Can someone please point me to a steps by step procedure to get this trinket running? I can't believe this should be so hard.
Thanks
KentM

Merkelck
 
Posts: 40
Joined: Mon Jan 22, 2018 10:55 pm

Re: Trinket first effort problem

by Merkelck on Fri Oct 05, 2018 9:50 pm

I finally got things together and made the Trinket work as I wanted it to. This process required a complete uninstall of the windows version of the IDE. I learned here that the Arduino IDE does not show up in the "add/remove programs" list of control panel. There is an uninstall choice in the Start menu but I was unsure just how thorough that would be. I then backed up all my sketches and did a search and destroy mission in the registry. I then re-installed the IDE from the Msoft store. I did not need to add drivers as everything seemed to be there. I did add the Adafuit files on the preferences page and updated the board manager files. After I got my sketches and libraries in the right places, everything worked as it should. I'm sure that my blind trial and error operations from my previous six months had left some weird traces.
KentM

Merkelck
 
Posts: 40
Joined: Mon Jan 22, 2018 10:55 pm

Re: Trinket first effort problem

by adafruit_support_mike on Sat Oct 06, 2018 5:28 am

I'm glad to hear you got things working.

Sometimes the Arduino IDE does get wound up in its own history, and a full reinstall is the easiest solution. There's no obvious reason for it to be the guilty party in this case, but if it worked, it worked.

Happy hacking!

adafruit_support_mike
 
Posts: 59421
Joined: Thu Feb 11, 2010 2:51 pm

Re: Trinket first effort problem

by Merkelck on Sat Oct 06, 2018 12:26 pm

A couple of days ago I was all but ready to throw in the towel but it is working now. Using a sketch provided by chemdoc77, I put together a couple jack-o-lanterns using the Trinket and Jewel 7. The pumpkins are plastic and one is Styrofoam. The color changes don't look the same primarily because of the color and texture inside. But the effect is satisfactory on both.
KentM
You tube video is here https://youtu.be/UpC98aIcedU

Merkelck
 
Posts: 40
Joined: Mon Jan 22, 2018 10:55 pm

Re: Trinket first effort problem

by adafruit_support_mike on Sun Oct 07, 2018 12:15 am

Looks good!

Thanks for posting the video. ;-)

adafruit_support_mike
 
Posts: 59421
Joined: Thu Feb 11, 2010 2:51 pm

Re: Trinket first effort problem

by Merkelck on Wed Oct 10, 2018 9:00 pm

Since my last post regarding the Jack-o-lantern, I have rebuilt the device to allow use in other projects. I removed the header pins from the trinket and installed a two pin connector for the power. The jewel is connected to the trinket with two buss wires and the 220ohm resistor for the data input. I used sleeving on the other two leads. These wires are flexible enough to allow the jewel to be positioned as required. Then I mounted the electronics to a 4AA battery box that has a switch. I cut a 1.5in hole in the bottom of the pumpkin. I then mounted two sets of velcro strips to the pumpkin and to the battery box. The trinket is held to the battery box with tacky putty. I adjusted the jewel so that it favors the back of the pumpkin. I also added a diffuser tube over the jewel to soften the light. The diffuser is nothing more than wax paper rolled into two layers. The pumpkins came from Walmart and are mostly plastic and foam.
The sketch is here, thanks to Chemdoc77

https://forums.adafruit.com/download/file.php?id=61017

The current video is here
https://youtu.be/wmXwEt8_Qi8

I am living proof that the Trinket will work but please don't ask me how I did it. I had most of the troubles others have described here but apparently even the blind hog finds an acorn once in awhile!!!

KentM

Merkelck
 
Posts: 40
Joined: Mon Jan 22, 2018 10:55 pm

Re: Trinket first effort problem

by wescrock on Wed Oct 24, 2018 3:05 pm

Merkelck wrote:After I got my sketches and libraries in the right places, everything worked as it should.


Can sketches not just be saved in any old place? I, too, get the device not working error that was at the end of your uploaded PDF.

wescrock
 
Posts: 8
Joined: Thu Oct 18, 2018 4:42 pm

Re: Trinket first effort problem

by Merkelck on Wed Oct 24, 2018 5:10 pm

In my case I wound up putting the sketches (.ino) files in the folder called "sketchbook". Sketchbook is a folder under the folder "libraries" and libraries is a folder under the folder called "Arduino". My Arduino folder is located under the Documents folder and as far as I know it was located there by the installation process after I got the Arduino software from the Msoft store. This version shows a title "Arduino 1.8.7 (Windows store 1.8.15.0)" at the top of every sketch. In the sketchbook folder, each .ino file is located in a folder of the same identical name.
I hope this helps
KentM

Merkelck
 
Posts: 40
Joined: Mon Jan 22, 2018 10:55 pm

Re: Trinket first effort problem

by wescrock on Wed Oct 24, 2018 5:14 pm

Thanks.

I have an issue where my first few flashes (one to control the red light on the board and one to do a demo rainbow thing on the pixel ring) worked fine... Hooked it back up the next night and NOTHING would flash... I did change my save locations for the files to auto-save to my dropbox folder... It's a long shot, but maybe it's just something around file location! lol.

wescrock
 
Posts: 8
Joined: Thu Oct 18, 2018 4:42 pm

Please be positive and constructive with your questions and comments.