If you’re following, that’s MOSI on the Pi to the second pin down on the right of the Trinket and then work your way through MISO and SCK on the Pi, and down on the Trinket- the pins are in the same order.įinally, connect the power and ground connections. When connecting the Trinket, which is our slave device, we want to connect these to SPI In, SPI Out and SPI Clock. These three pins are known as MOSI, MISO and SCK - these catchy names stand for “Master Out, Slave In”, “Master In, Slave Out” and “Clock.” Next you will need to connect up the pins that do the programming. GPIO 8 is the second to bottom most pin on the right of the Pi GPIO header.
#Adafruit trinket 3.3v serial#
Colour Code It’s a good idea to stick with red/black wire for power/ground and pick separate colours for serial and SPI.įirst connect GPIO 8 on your Raspberry Pi to the Reset pin on the Trinket. If you’re doing this on a breadboard you’ll need 6 female-to-male jump leads power, ground, mosi, miso, clock, reset. Once you’ve got the Trinket set up on your breadboard you need to make the power and SPI connections to it from your Raspberry Pi GPIO header. Align it so that the USB port hangs over one edge, although we won’t be programming the Trinket over USB it’s a handy source of power. You should then pop the Trinket into the 170pt breadboard. This will let you push it into a breadboard and keep it securely positioned for tinkering. Connecting Them Togetherįirst, solder two 4-pin male headers to your Trinket pointing downwards.
#Adafruit trinket 3.3v install#
This should install the Arduino IDE, the modified avrdude ( used for flashing programs to your Trinket ) and Arduino-Makefile which makes it easier to compile your Arduino programs from the command-line and avoid the Arduino IDE itself.Īlternatively you can manually install each component from the GitHub repo, and I'll assume you know what you're doing!. We’ve put together a simple setup script which will get you set up in a jiffy, just: git clone If you’re running Raspbian you can just grab the contents of our GitHub repository. You’ve got two choices when it comes to setting up the software. We recommend our Jumper Jerky to make all the necessary connections. If you have male to male wires and an extra breadboard handy you can use the Adafruit Pi T-Cobbler to clarify where the SPI, power and Serial pins are.
Two of these can be configured as analog inputs and two as PWM outputs.
#Adafruit trinket 3.3v how to#
The skills you pick up from tinkering with a Trinket and learning how to program it will also be transferable should you decide to try any Arduino products. One that you can not only use with your Pi, but as a stand-alone controller. The trinket is a cheap and flexible alternative to a PWM driver, or an analog to digital converter.
The Trinket and the Pi are a very complementary pair. Warning: Make sure you use the 3.3v Trinket, don't connect a 5v one directly to your Pi! Why Combine A Trinket And A Pi?
The Attiny85 is a useful processor because despite being so small, it has 8K of flash, and 5 I/O pins, including analog inputs and PWM analog outputs. It is a low cost Arduino IDE programmable board. The board is designed to be small enough to fit into any project. Adafruit Trinket - Mini Microcontroller - 3.3V Logic - (Arduino Mini Alternative) infoĪdafruit Trinket 3.3V is a tiny and low cost microcontroller board, built around the Atmel ATtiny85, a little chip with a lot of power.