Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Trinket 5 volt leds on pin 3 &4
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket 5 volt leds on pin 3 &4

by jasmilly on Mon Apr 27, 2020 11:36 am

Hi have the arduino blink example working fine inpins 0,1,2


The only way I can get pins 3 & 4, to blink is to, not include a resistor. I only did this briefly, I thought you always needed to include a resistor.

Should I include a resistor or not on these pins

thanks

jasmilly
 
Posts: 4
Joined: Sun Apr 26, 2020 10:46 am

Re: Trinket 5 volt leds on pin 3 &4

by dastels on Mon Apr 27, 2020 12:17 pm

Pins 3 & 4 are "special". They are used for the USB and have some limitations on their use. See The tutorial, specifically https://learn.adafruit.com/introducing-trinket/pinouts.

Dave

dastels
 
Posts: 3023
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5 volt leds on pin 3 &4

by jasmilly on Mon Apr 27, 2020 1:04 pm

Thanks for the reply, this link says they are best used for lighting up Leds, this is exactly what I want to do with them. They need connecting after the programme is uploaded which I have done, but I am unsure if a resistor should be used or not.


I have been unable to find a tutorial using these pins to control LEDS and the article doesn't make it very clear for me.

The only way I can get the Leds to blink is without however I am concerned I may damage the trinket or the leds

jasmilly
 
Posts: 4
Joined: Sun Apr 26, 2020 10:46 am

Re: Trinket 5 volt leds on pin 3 &4

by dastels on Mon Apr 27, 2020 2:21 pm

Turn the pin on steady and measure the voltage. If it is greater that ~1.7 then you need a resistor.

One problem might be that the USB circuitry is connected to those pins. See https://cdn-learn.adafruit.com/assets/assets/000/010/774/original/adafruit_products_trinket5.png?1378223478.

Did you disconnect the USB cable before testing?

Dave

dastels
 
Posts: 3023
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5 volt leds on pin 3 &4

by jasmilly on Tue Apr 28, 2020 6:44 am

ok thanks will do that.

I have disconnected it from the USB port of my laptop and connected the usb cable to a phone charger to power it. USB is the only way I have of powering it at the moment.

jasmilly
 
Posts: 4
Joined: Sun Apr 26, 2020 10:46 am

Please be positive and constructive with your questions and comments.