项目作者: filips123

项目描述 :
Sense HAT’s LED display as Linux FIFO file
高级语言: Python
项目地址: git://github.com/filips123/SenseOUT.git
创建时间: 2018-06-15T12:54:57Z
项目社区:https://github.com/filips123/SenseOUT

开源协议:GNU General Public License v3.0

下载


Sense HAT

SenseOUT

Sense HAT’s LED display as Linux FIFO file.

Description

The project has a Python 3 program that reads data from a Linux FIFO file and prints them to Sense HAT’s LED display.
Reading from normal file or other device file is also supported.

The project is made just for fun and is shouldn’t have any useful value. If you find it, please let me know.

Usage

The project works only on Raspberry Pi with attached Sense HAT and installed Python. It was tested on Raspberry Pi 3, but it should also works on other versions of Raspberry Pi.

First, you should clone the project:

  1. git clone https://github.com/filips123/SenseOUT.git # Clone the project
  2. cd SenseOUT # Go to project directory

Then you should create a new Linux FIFO file:

  1. mkfifo sensehat # Create a new FIFO file

The default input file is sensehat. To change it, pass file name as first program argument:

  1. python3 handler.py /path/to/file # Use custom file

You could run the program in the background:

  1. python3 handler.py & # Run the program in the background

Then you could write data to the file and they will be displayed on Sense HAT’s LED display:

  1. echo "ABC" > sensehat # Display output only on Sense HAT’s LED display
  2. # OR #
  3. echo "ABC" | tee sensehat # Display output on Sense HAT’s LED and in terminal

You could also display commands outputs, but you shouldn’t use the commands with a lot of output:

  1. ls | tee sensehat # Display content of directory on Sense HAT’s LED and in terminal

License

This project is licensed under the GNU General Public License v3. See the LICENSE file for details.