Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
selmaohneh authored and selmaohneh-draeger committed Oct 1, 2020
1 parent d39ce00 commit 887f6dc
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
# LedTableSimulator
Simulation frontend for a 10 x 10 RGB Pixel Led Table
A simulation frontend for 10x10 RGB LED tables.

This Repository contains a platform agnostic UI frontend that visualizes a 10 x 10 RGB LED Matrix LedTable.
## Getting Started
1. Execute **LedTableSimulator**
2. Enter the IP address of your open MQTT server.
3. Hit ENTER or click on CONNECT.
4. Publish your framebuffers conforming to the requirements stated below to `ledtable/simulation/framebuffer`.
5. Enjoy the simulation! :-)

Requirements:
1. The UI should be as platform independend as possible (at least MacOS, Linux and Windows should be supported, Bonus points for Android and iOS)
2. The UI should contain a 10 x 10 LED Pixel Matrix with rather huge pixels (lets say 64x64 screen pixels for one LED pixel)
3. The Simulator should receive the pixel values to be shown based on the following specification:
- Each pixel is represented bye 3 Bytes
- Each byte in a single pixel datum represents a single color value (0 - 255 where 0 is off, and 255 is maximum brightness)
- The color order of each pixel is BGR (blue, green red)
- The pixel values for the whole table are represented as a byte array of size 10 x 10 x 3 bytes.
4. The pixel data array of point 3.d is named framebuffer from now on
5. The Simulator should receive the framebuffer via MQTT by subscribing to the topic ledtable/simulation/framebuffer
6. Whenever the framebuffer is received via mqtt - the UI should update its state based on the framebuffer content
7. The pixel order inside the framebuffer is as follows (snake pattern):
- Width is 10 pixels - refered to by W
- Height is 10 pixel - refered to by H
![](ledtablegif.gif)

## Framebuffer requirements:
- Each pixel is represented by 3 bytes.
- Each byte in a single pixel represents a color value (0 - 255, where 0 is off and 255 is maximum brightness).
- The color order of each pixel is BGR (blue, green red).
- The pixel values for the whole table are represented as a byte array of size 10x10x3 bytes.
- The pixel data array of point 3 is named framebuffer from now on.
- The pixel order inside the framebuffer is as follows (snake pattern):
- Width is 10 pixels - refered to by W.
- Height is 10 pixel - refered to by H.
- X and Y are coordinates on the table where x = 0 is the very left and y = 0 is the very bottom of the table.
- Pixel order is x0y0 .. x0yH, x1yH .. x1y0, x2y0 .. x2yH, x3yH ..x3y0 .. further to the right until xW
- The pixel order then is x0y0 .. x0yH, x1yH .. x1y0, x2y0 .. x2yH, x3yH ..x3y0 .. further to the right until xW.

## Cross-Platform
**LedTableSimulator** is based on [the MonoGame framework](https://github.com/MonoGame/MonoGame). It can be build for other platforms than Windows, as well. In order to do so, simply swap the corresponding NuGet package and re-build the project.

0 comments on commit 887f6dc

Please sign in to comment.