|
1 |
| -## B1 Display |
| 1 | +# B1 Display |
| 2 | + |
| 3 | +A transmissive, mono-color (black/white) screen that's 300x400px in size. |
| 4 | +It's 4.2 inches in size and mounted in portrait orientation. |
| 5 | +Because it's optimized for power, the recommended framerate is 1 FPS. |
| 6 | +But it can go up to 32 FPS. |
| 7 | + |
| 8 | +The current panel is susceptible to image retention, so the display will start |
| 9 | +up with the screen saver. If you send a command to draw anything on the display, |
| 10 | +the screensaver will exit. |
| 11 | +Currently it does not re-appear after a timeout, it will only re-appear on the |
| 12 | +next power-on or after waking from sleep. |
| 13 | + |
| 14 | +## Controlling |
| 15 | + |
| 16 | +### Display System Status |
| 17 | + |
| 18 | +For a similar type of display, there's an |
| 19 | +[open-source software](https://github.com/mathoudebine/turing-smart-screen-python) |
| 20 | +to get systems stats, render them into an image file and send it to the screen. |
| 21 | + |
| 22 | +For this display, we have [a fork](https://github.com/FrameworkComputer/lotus-smart-screen-python). |
| 23 | +To run it, just install Python and the dependencies, then run `main.py`. |
| 24 | +The configuration (`config.yaml`) is already adapted for this display - |
| 25 | +it should be able to find the display by itself (Windows or Linux). |
| 26 | + |
| 27 | +###### Configuration |
| 28 | + |
| 29 | +Check out the [upstream documentation](https://github.com/mathoudebine/turing-smart-screen-python/wiki/System-monitor-%3A-themes) |
| 30 | +for more information about editing themes. |
| 31 | + |
| 32 | +Currently we have two themes optimized for this display: `B1Terminal` and `B1Blank`. |
| 33 | + |
| 34 | +`B1Terminal` comes pre-configured with lots of system stats. |
| 35 | + |
| 36 | +`B1Blank` comes configured as rendering the text in `file1.txt` onto the screen. |
| 37 | + |
| 38 | +Both can be fully customized by changing the background image and the displayed statistics |
| 39 | +in `res/themes/{B1Blank,B1Terminal}/background.png` and `res/themes/{B1Blank,B1Terminal}/theme.yaml` |
| 40 | +respectively. |
| 41 | + |
| 42 | +### Commandline |
| 43 | + |
| 44 | +``` |
| 45 | +> ./inputmodule-control b1-display |
| 46 | +B1 Display |
| 47 | +
|
| 48 | +Usage: ipc b1-display [OPTIONS] |
| 49 | +
|
| 50 | +Options: |
| 51 | + --sleeping [<SLEEPING>] |
| 52 | + Set sleep status or get, if no value provided [possible values: true, false] |
| 53 | + --bootloader |
| 54 | + Jump to the bootloader |
| 55 | + --panic |
| 56 | + Crash the firmware (TESTING ONLY!) |
| 57 | + -v, --version |
| 58 | + Get the device version |
| 59 | + --display-on [<DISPLAY_ON>] |
| 60 | + Turn display on/off [possible values: true, false] |
| 61 | + --pattern <PATTERN> |
| 62 | + Display a simple pattern [possible values: white, black] |
| 63 | + --invert-screen [<INVERT_SCREEN>] |
| 64 | + Invert screen on/off [possible values: true, false] |
| 65 | + --screen-saver [<SCREEN_SAVER>] |
| 66 | + Screensaver on/off [possible values: true, false] |
| 67 | + --image-bw <IMAGE_BW> |
| 68 | + Display black&white image (300x400px) |
| 69 | + --clear-ram |
| 70 | + Clear display RAM |
| 71 | + -h, --help |
| 72 | + Print help |
| 73 | +``` |
| 74 | + |
| 75 | +### Non-trivial Examples |
| 76 | + |
| 77 | +###### Display an Image |
| 78 | + |
| 79 | +Display an image (tested with PNG and GIF). It must be 300x400 pixels in size. |
| 80 | +It doesn't have to be black/white. The program will calculate the brightness of |
| 81 | +each pixel. But if the brightness doesn't vary enough, it won't look good. One |
| 82 | +example image is included in the repository. |
| 83 | + |
| 84 | +```sh |
| 85 | +# Should show the Framework Logo and a Lotus flower |
| 86 | +inputmodule-control b1-display --image-bw b1display.gif |
| 87 | +``` |
| 88 | + |
| 89 | +###### Invert the colors (dark-mode) |
| 90 | + |
| 91 | +Since the screen is just black and white, you can display black text on a |
| 92 | +white/light background. This can be turned into dark mode by inverting the |
| 93 | +colors, making it show light text on a black background. |
| 94 | + |
| 95 | +```sh |
| 96 | +# Invert on |
| 97 | +> inputmodule-control b1-display --invert-screen true |
| 98 | + |
| 99 | +# Invert off |
| 100 | +> inputmodule-control b1-display --invert-screen false |
| 101 | + |
| 102 | +# Check if currently inverted |
| 103 | +> inputmodule-control b1-display --invert-screen |
| 104 | +Currently inverted: false |
| 105 | +``` |
0 commit comments