Hardware


Shell Lab L3 is programmable 8-segments LED display with USB/serial interface

Characteristic:

● 6-digital 0.56inch bright white 8-segment LED display
● all segments configurable, support alphabet (portion)
● support blink mode
● black 3D-printed case
● USB powered, cable length 2-meter
● interactive serial console with ASCII command, online manual embedded
● programming language is not limited (Python recommended)
● quick test with Testbench App (with various demo codes)
● pip install mcush library (support windows/linux/mac) and write scripts easily

Use cases:

● prototype design
● in-progress value indication in product/software cycle test
● indication in assembly line, green for PASS and red for FAIL
● experiment progress indication
● kanban/placard indication
● logistic/storage management, goods location indicator
● interactive game design
● educational experiment design
● outdoor case, auto indicator
● system integration for industrial equipment

Customize:

● other digits/size display

Software

Serial Communication FAQ
C Programming FAQ

Serial command:

display control command
=>disp --help
usage: disp [-c command] [-i index] [-v value] [-m message]
options:
 -c/--cmd        digits clrscr test blink brightness start stop raw hex ascii int
 -i/--idx        index param
 -v/--val        value param
 -m/--msg        display message
=> 

Example:

clear screen
=>d -c clrscr
=> 
display string "HELLO"
=>d -m HELLO
=> 
display string "3.14" from 2nd position
=>d -i 1 -m 3.14
=> 
display number 9 at 4th position
=>d -c hex -i 3 -v 9
=> 
clear char at 5th position
=>d -c raw -i 4 -v 0
=> 
blink whole display:
=>d -c blink
=> 
set blink mode at 3rd positio
=>d -c blink -i 3
=> 
display integer 1234 (right aligned)
=>d -c int -v 1234
=> 

Python API:

Install: sudo pip3 install mcush
Upgrade: sudo pip3 install -U mcush
class ShellLabSegmentDisplay(mcush.ShellLab.ShellLab):
    def disp(self, cmd=None, idx=None, val=None, msg=None):
        # lower level serial command

    def ascii(self, val, idx):
        # display ASCII character

    def blink(self, on, idx=None):
        # set blink mode

    def brightness(self, new_brightness=7):
        # set brightness 

    def clrscr(self):
        # clear screen

    def dispFloat(self, val, precesion=1, align='right'):
        # display float number

    def dispHex(self, val, align='right'):
        # display multi HEX chars

    def dispInteger(self, val, align='right'):
        # display integer

    def dispString(self, string, align='left'):
        # display string

    def hex(self, val, idx):
        # display single HEX char

    def int(self, val, idx=None):
        # display integer char

    def msg(self, msg, idx=None):
        # display string

    def raw(self, val, idx):
        # display raw binary codes

Example:

import mcush
from mcush.linkong.ShellLab import ShellLabSegmentDisplay
disp = ShellLabSegmentDisplay('COM10')  # fill the actual serial port
disp.dispString('HELLO')  # display string
disp.dispInteger(123)  # display integer
disp.dispFloat(123.4)  # display float (default 0.1 precision)

Download:

Shell Lab Testbench Application


CH341 VCP Driver(Windows)


Application

display demo
# this script runs in ShellLab Testbench Application
d = ShellLabSegmentDisplay(PORT)
d.dispString("SHELL-")
time.sleep(0.5)
d.dispString("LAB-L3")
time.sleep(1)
d.dispString("HELLO", align='right')
time.sleep(1)
for i in range(100):
    d.dispInteger( i )  # right aligned
    #d.dispInteger( i, align='left' )
f = 0.0
while True:
    d.dispFloat( f )  # precesion=1, right aligned
    #d.dispFloat( f, precesion=2 )
    f += random.random()



0.8 inch version

3 inch version


test with mcush_util
#!/bin/sh
# Shell Lab L3 segment display demo with mcush_util
# download/compile/install mcush_util firstly
# Shanghai Linkong Software Tech. Co., Ltd.
# www.xrsoft.com
set -e
PORT=/dev/ttyUSB0

# model match
mcush_util -p$PORT -mShellLab-L3 -r

mcush_util -nq -p$PORT run "d -mHELLO" "delay" "d -m'Shell-'" "delay" "d -m'lab-L3'" "delay"

# small integers
counter=0
while [ $counter -lt 100 ]; do
    mcush_util -nq -p$PORT run "d -cint -v$counter" "delay 50"
    counter=$((counter+1))
done

# large integers
for i in 100 1000 10000 100000 ; do
    mcush_util -nq -p$PORT run "d -cint -v$i" "delay 1000"
done

# end, clear screen
mcush_util -nq -p$PORT run "d -m------" "delay" "d -cclrscr"