So I used an adafruit 8x8 matrix and just use the webhools integration of of segment.io to post to the Spark API whenever an event happens on https://dentally.co
Take a look
I would like to expand this because the animation is a blocking for loop that just scrolls the line. Does anyone know how I could right to be a that the main loop scrolls the matrix, and the spark exposed function just draws a line at the origin, so multiple lines can be scrolling simultaneously.
As you can see when the function ‘boom’ is called via the API it starts a ‘for’ loop where a line is sequentially drawn across the 8x8 matrix. As is, the function gets triggered and cannot accept another call until the animation has completed. The behaviour I would to create is one in where when event hits the API to call the ‘boom’ function it sends a line to the display which over time moves to the bottom of the display. This behaviour would then allow two events to be displayed on the display as two horizontal lines moving towards the bottom of the display. I would like the animation of the lines to be independent of the creation of them. If that makes sense?
I would imagine this as the main loop just shifts the pixels on the matrix and the boom function just draws new lines at the top of the matrix whenever a call is made via the API.