RPi and AdaFruit Trinket clarification


I’m glad I found “Programming the Adafruit Trinket from your Raspberry Pi” here. It is very similar to what I want to do.

But I need a little clarification. The article starts off with this warning “Warning: Make sure you use the 3.3v Trinket, don’t connect a 5v one directly to your Pi!”. Then at the very end of the article it states, “Once you’re comfortable connecting the Trinket and the Pi you should switch to using the 5v pin on your Pi to power the Trinket, specially if you’re using the 3v output to drive something like NeoPixels”

So is that a contradiction or am I missing something? Or is my newbie electronics showing through here? Or is it saying that to use the 3.3v Trinket version because we are powering 3.3v sensors or LEDs or such but it’s ok to power it with 5V?

Also, if I do power it with 5V do I unplug the 3.3V jumper to the Trinket?

Lastly, I miss the part where the RPi talks to the Trinket. In my case, I want the RPi to tell the Trinket to flash the NeoPixel RGB LED a certain color and intensity for some duration and such. How do I do that?



The Bat+ on a Trinket can take as much as 16V on the input and powering the trinket from the 5V line on the Pi would be the preferred way to get a regulated i.e stable output from the 3V pin on the trinket, to drive sensors or neopixels, hence the parting paragraph.

Other than that, yes, I think you might be confused by the opening warning, which is a different thing altogether… connecting a 5V logic trinket directly to a Pi could damage it, depending on the connection you make, and otherwise what you are planning to do.

‘Talking to the trinket’ is not really something you’d do in real-time. The Pi would be used to flash the routine, or ‘sketch’ in Arduino speak, to the trinket for it to run. You could acquire data back via serial if you were reading analog sensors though, but the Pi would just be ‘listening’.

It’s a simplified picture though, there’s a lot of things you can do with an Arduino/Trinket, including controlling them in real time, but I don’t think that’s the idea of that tutorial.

EDIT: though you could of course trigger part of your program by driving one of the Pi GPIO high/low. Still, this is essentially using the Pi GPIO as one or more actuators, which I’m not sure is what you had in mind?


Actually, I stand corrected, there’s a bunch of examples in the repo that go into details about controlling neopixels over i2c, which sound like what you are trying to do. Have a look there"