Compiling the Code
If you don't want to use the pre-compiled code, you can build it yourself to load onto your Arcada board. This project requires using the Arduino IDE because it needs every bit of computational energy!
Visit the PyPortal Arduino Setup page to install the Arduino IDE (or update it), install PyPortal support or ditto for whatever hardware you're using. Also make sure you installed all the Arduino Libraries (and you need quite a lot!)
Search for the Adafruit Arcada GifDecoder library and install it
Verify you have the latest version of all the libraries on this page via the Arduino Library Manager. The code will not compile with earlier versions.
We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use
Configuring SdFat
If you plan to use the SD card to play GIFs you'll need to update SDFatConfig.h
in the SdFat library you installed, and change the following #define's:
//------------------------------------------------------------------------------ /** * If the symbol ENABLE_EXTENDED_TRANSFER_CLASS is nonzero, the class SdFatEX * will be defined. If the symbol ENABLE_SOFTWARE_SPI_CLASS is also nonzero, * the class SdFatSoftSpiEX will be defined. * * These classes used extended multi-block SD I/O for better performance. * the SPI bus may not be shared with other devices in this mode. */ #define ENABLE_EXTENDED_TRANSFER_CLASS 1 //------------------------------------------------------------------------------ /** * If the symbol USE_STANDARD_SPI_LIBRARY is zero, an optimized custom SPI * driver is used if it exists. If the symbol USE_STANDARD_SPI_LIBRARY is * one, the standard Arduino SPI.h library is used with SPI. If the symbol * USE_STANDARD_SPI_LIBRARY is two, the SPI port can be selected with the * constructors SdFat(SPIClass* spiPort) and SdFatEX(SPIClass* spiPort). */ #define USE_STANDARD_SPI_LIBRARY 2
Initial Test
Let's make sure you can get the basics going before we customize it
Make sure you have the Adafruit PyPortal type of board selected or whatever board you're looking to use, and pick the right COM port. It may or may not have Adafruit PyPortal next to the serial port name. If you can't find it, double-click the reset button to put it into bootloader mode, then select the serial port when it appears.
Under USB Stack select TinyUSB - this will let the board show the filesystem up as a disk drive
In order to really be able to display GIFs at full speed, we need to overclock a bit...Make sure that before you continue, you have the following selected:
- CPU Speed: 180 MHz (you can also try 200)
- Optimize: fast
- Cache: Enabled
Click Upload to upload the sketch to the PyPortal
You may get a notice that there's not configuration file found, and also likely
Page last edited March 08, 2024
Text editor powered by tinymce.