You may have seen on my posts on Twitter about my project “Digital Zoetrope”. It is going to be a true zoetrope, with 12 Adafruit OLED displays connected to a single Raspberry Pi via SPI. The first hurdle is that the Raspberry Pi has only two CS lines, after talking with my friends at Makespace, Cambridge’s maker/hack space. I decided that the displays would be daisy chained together with custom daughter PCBs controlling the CS line and isolating any other data lines as required, they will also buffer the signals. The PCBs will act as shift register, passing the signals on to the next screen. I also have plans for creating a Raspberry Pi video camera for recording short films to download to the zoetrope. I hope to have the above, all ready for the UK Makerfaire in Newcastle and a pro-type running at the Raspberry Pi birthday bash. I would also like to thank Pimoroni for their support in the making of this project.
I have been working on this project since the start of the year, first thing I did was select the display I would be using, the reason, I selected the Adafruit OLED is the bright image, and also that there was code written for the Arduino by Adafruit, first job was converting the Adafruit C code into python, I needed a library for controlling the display over SPI, I found and followed a “how too” on the Raspberry Pi Spy blog site, and installed the py-spidev library.
I wrote a number of test programs and was able to write directly to the screen memory and was able to update the screen in less than 0.03 of a second, result. Due to a limitation with the SPI library write function, I had to break each frame into 8 blocks.
Next job was writing a single frame from a video to the display, for this purpose I installed the python library SimpleCV, with the library, I was able to convert a MP4 formatted video to single frames, and read the RGB value of each pixel. The next step was to convert the RGB value to the 565 colour space and load the pixels into blocks and then each block of pixels into a single list for each frame. The frames are stored in another list. At the end of this I was finally able to display images on the display! You can find the code on my Github account.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.