Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - beermat

Pages: 1
1
General Discussion / TinyScreen+ driving multiple displays demo
« on: March 02, 2017, 07:24:25 PM »
Video here: https://www.youtube.com/watch?v=KF0zIwhqUz0

Well, I achieved what I set out to do (use the TinyScreen+ to drive multiple OLED displays I have acquired over the past few months) but the code is a major hackfest, so will remain private for now :)

The sketch is a *heavily* hacked version of the Adafruit Teensy sketch here (using dragon eyes): https://learn.adafruit.com/animated-electronic-eyes-using-teensy-3-1

Modifications include using an in-memory buffer to store the display output, so this buffer can be pushed to each screen, rather than having to redraw on each screen. This buffer is then pushed using SPI DMA to the displays. Two DMA channels are used simultaneously - one to push the buffer to the TinyScreen+ integrated display, and the other channel to push the buffer to the 3 external displays. All external displays share MISO, MOSI, CLK and DC. Because the two displays on the left of the TinyScreen+ are SSD1331 based and the one on the right is SSD1351 based (and a higher 128*96 resolution), separate initialization and setup commands are required, so two CS pins are used to target the appropriate commands to the appropriate driver/screen. The SSD1351 display on the right is configured to use a 96*64 pixel section.

Frame rate is a healthy 73fps!

Video here: https://www.youtube.com/watch?v=KF0zIwhqUz0

2
General Discussion / TinyScreen+ fireworks
« on: February 28, 2017, 12:31:24 AM »
Quick sketch I've been working on, playing with various features of TinyScreen+ and exploring performance potential of the product. This sketch draws firework-like particles on the TinyScreen+, utilizing some fast (approximate) sin and cos libraries from FastLED, a fast memcpy function from Daniel Vik, and double full screen buffers, transmitted to the screen via DMA buffer transfer in TinyScreen.cpp. Trails are created by dimming previous pixels in the buffer. Some comments in the sketch should guide you to play around and change parameters or create new animations. Code readability sacrificed for performance, but the basic principle of the particle motion is:

x=cos(angle) * velocity * time
y=sin(angle) * velocity * time + (gravity * time2)/2

Video here: https://www.youtube.com/watch?v=yx1q0dLf7og
Code here: https://github.com/egonbeermat/fireworks
FastLED library here: https://github.com/FastLED/FastLED/releases

Beermat

3
My sons Cub Scout pack has a Pinewood Derby 'open' race for family members, so I decided to enter this year. My initial goal was to 'add a few lights' to a car, but I had no set idea of what I was going to do.....but, a few weeks later,  after discovering the TinyScreen+ from TinyCircuits, Neopixels from Adafruit and LSM303 Accelerometer/Compass from Adafruit, (and with much research, learning and experimentation), I present "The Light Fantastic"! (The flicker on the TinyScreen+ display is an artifact of this video - in real life, it's rock solid)

The car plays through a sequence of Neopixel patterns with OLED bitmap displays, animations and text marquees, and can detect being tilted forward to switch to a "race mode" RPM-style gauge display. A menu can be accessed by pressing one of the microswitches, and the mouse pointer/settings/compass display accessible from there are controlled by tilting/rotating the car. Obligatory TinyScreen game Flappy Birdz is included and also playable on the car! The menu, along with selections of brightness configuration, displaying a compass and playing Flappy Birdz, are shown at the end of the video. Enjoy!


https://www.youtube.com/watch?v=U_Pty_Ip0gw

Egon Beermat

Pages: 1
SMF spam blocked by CleanTalk