Brian Lough

Twitch Draws On My LED Matrix

And no one drew anything inappropriate!

On a recent live stream (BrianLough is my Twitch name) I revisited my "Twitch draws on my LED matrix" project. It's pretty amazing to see people being able to draw pretty cool things using very basic commands! Check out the examples below!

TwtichDraws3

TwitchDraws1

TwtichDraws4

Pretty impressive right!? The best part was nobody at any stage tried to draw anything inappropriate, a great success I would say, good job everyone!

Well done

In future I would like to set up a "Twitch Plays" stream, similar to Twitch Plays Pokemon, where the sole purpose of the stream is people drawing on the matrix. I think I need to make it a little bit more robust first. I am a small bit concerned about what might be drawn on it, but hopefully it will be used to create interesting things rather than bad!

I will introduce it as a regular side feature on my live streams in future. There were some suggestions of making games for it too, like connect 4, which I liked the sound of a lot!

Video:

The video from the live stream can be watched back here

Commands:

The commands look like this:

  • !draw x y red will draw a single red pixel in the given x / y co-ordinate
  • !rect x y w h blue will draw a blue rectangle starting at x / y that is w wide and h tall (moving downwards from origin)
  • !line x y x1 y1 green will draw a green line starting at x / y and finishing at x1 / y1
  • !circle x y r white will draw a white circle with a center at x / y and a radius of r

Big thanks to Seon of the Unexpected Maker who added rect, line and circle commands as part of a PR, cheers mate!

Software:

The project consists of two parts

(Note: Neither of these are my finest work, the need a bit of tidying up!)

The ESP8266 runs a socket server that is waiting for commands to be sent to it. The NodeJs app receives the commands from the twitch viewer and parses it and sends a websocket message to the ESP8266.

There is basic instructions for getting this setup on each project's Readme, let me know if you are running into any issues.

Hardware:

By far the star of the show is the LED matrix. These are, in my opinion, one of the best displays you can use with an Arduino project and are not even that expensive. For more info about the display check out the following video:

Here is a list of parts you'll need (*= Affiliate Links):

RGB LED Matrix 64 x 32 P3 (The one I'm using)

5v 8A laptop style PSU

Wemos D1 Mini Clone*: http://s.click.aliexpress.com/e/uzFUnIe

Female-Female 20CM Dupont cable*: http://s.click.aliexpress.com/e/eu3j2j6

10pcs 2.1mm Adapters (both sockets and plugs)*: http://s.click.aliexpress.com/e/UbMvnmQ

Conclusion:

I'm really happy with how this project is going, but it still has some ways to go. I'll keep working on it anyways.

If you have any suggestions or comments please free to reach out to me. Either comment on one of the videos or you can reach me on twitter.