Programming the Trinket

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Thrivenrg
 
Posts: 6
Joined: Wed Oct 12, 2016 11:13 pm

Programming the Trinket

Post by Thrivenrg »

Ok I bought a bunch of these little guys to perform all sorts of stuff for my companies development. Creating little timer modules is the biggest job we want them for as time functions hold thing up in core software.

So now I have timer code set up and ready to go. But now I cant figure out how to program this little guy. So here is where Im at.

Plugged the Trinket in to the pc, driver has loaded fine.

Ive gone in and selected USBtinyISP from the programmer in the tools menu.

Under Boards in the tools Menu, I have " Arduino Gemma" selected

In the Tools Menu "port" is grayed out. Question: Is there supposed to be a port available using this configuration?

Before I upload I press the button on the board and it goes dim initially and then pulses afterward.

So with no port selected as there is not an option available; Ive tried to upload and I get an error.

"avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)"


I am running an older version of the Arduino IDE I think; its version 1.6.7

My PC is running window 8.1 and does not have USB 3.0 ports they are 2.0 versions.

My code:

Code: Select all

int InputPin = analogRead(0);    // select the input pin for the potentiometer

int OutputPin = 3;      // select the pin for the LED
int sensorValue=0;  // variable to store the value coming from the sensor

int InputState = 0;


void setup() 
{
  // declare the ledPin as an OUTPUT:
  pinMode(OutputPin, OUTPUT);
  pinMode(InputPin, INPUT);
}

void timer1(){

  InputState = digitalRead(InputPin);


        int timer1_value = (50); 
        for (int i = timer1_value; i >= 0; i--){ //Begin the loop

            delay(100);
        }
    }
void timer2(){


                          
        int timer2_value = (1); 
        for (int i = timer2_value; i >= 0; i--){ //Begin the loop

            delay(100);
        }
    }

void loop() {
  
    if (InputState == HIGH){
  digitalWrite(OutputPin, LOW);
 timer1();
  digitalWrite(OutputPin, HIGH); 
timer2();                 
}
else{
  digitalWrite(OutputPin, HIGH);
}
  
}

User avatar
Franklin97355
 
Posts: 23902
Joined: Mon Apr 21, 2008 2:33 pm

Re: Programming the Trinket

Post by Franklin97355 »

Select the Trinket in the boards menu. The instructions are in the tutorial.

User avatar
Franklin97355
 
Posts: 23902
Joined: Mon Apr 21, 2008 2:33 pm

Re: Programming the Trinket

Post by Franklin97355 »

Select the Trinket in the boards menu. The instructions are in the tutorial.

User avatar
Thrivenrg
 
Posts: 6
Joined: Wed Oct 12, 2016 11:13 pm

Re: Programming the Trinket

Post by Thrivenrg »

There is not an option for that

User avatar
Thrivenrg
 
Posts: 6
Joined: Wed Oct 12, 2016 11:13 pm

Re: Programming the Trinket

Post by Thrivenrg »

franklin97355 wrote:Select the Trinket in the boards menu. The instructions are in the tutorial.
This is not a tutorial its the description page to purchase this.

Edit: its the introduction page it does not have instruction to upload from the Arduino IDE.

User avatar
Thrivenrg
 
Posts: 6
Joined: Wed Oct 12, 2016 11:13 pm

Re: Programming the Trinket

Post by Thrivenrg »

Here is the screen shot of the IDE and board selection.
Attachments
Arduino IDE Trinket 1.png
Arduino IDE Trinket 1.png (108.38 KiB) Viewed 1802 times

User avatar
Franklin97355
 
Posts: 23902
Joined: Mon Apr 21, 2008 2:33 pm

Re: Programming the Trinket

Post by Franklin97355 »

2017-09-13_11h07_18.png
2017-09-13_11h07_18.png (121.73 KiB) Viewed 1801 times
Did you look at these sections?
Attachments
2017-09-13_11h04_04.png
2017-09-13_11h04_04.png (34.12 KiB) Viewed 1801 times

User avatar
Thrivenrg
 
Posts: 6
Joined: Wed Oct 12, 2016 11:13 pm

Re: Programming the Trinket

Post by Thrivenrg »

Ok Ive found the links and following instructions now. I have the baords loaded up and now working on loading the adafruit windows drivers. Ill post results here is a few, I really want this guy to work!

Cheers

User avatar
Thrivenrg
 
Posts: 6
Joined: Wed Oct 12, 2016 11:13 pm

Re: Programming the Trinket

Post by Thrivenrg »

Ok it worked, thank you for your assistance! If I run into any more walls Ill be back haha.

Cheers

User avatar
Franklin97355
 
Posts: 23902
Joined: Mon Apr 21, 2008 2:33 pm

Re: Programming the Trinket

Post by Franklin97355 »

Glad I could be of assistance.

User avatar
Al_GM
 
Posts: 1
Joined: Fri Dec 29, 2017 9:59 pm

Re: Programming the Trinket

Post by Al_GM »

i have the same problem i have tried with windows and Raspian, download adafruits drivers and when connect the trinket is recognized in control panel>printer and devices like trinket, but the same in ports there is only COM1 and the problem is the error "Could not find USBtiny device (0x1781/0xc9f)" i have done all in the different adafruit pages but nothing even i tried with diferent cables, a new one, without success. help

User avatar
Franklin97355
 
Posts: 23902
Joined: Mon Apr 21, 2008 2:33 pm

Re: Programming the Trinket

Post by Franklin97355 »

How are you setting up the IDE for uploads?

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”