npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-st7735s

v0.0.3

Published

IPS LCD for ST7735s controller

Downloads

10

Readme

node-red-contrib-st7735s

Image text

Node-Red node to talk to ST7735S TFT displays, connected by Raspberry Pi's SPI. The node is using JSPyBridge to provide the JS bindings for the Python ST7735 using Standard Error as the IPC. Additionally, all the functionalities provided is using the PIL Image and ImageDraw module. Requires Node.JS >= 16 and Python to be installed.

Usage

Enable SPI

Enable the Raspberry Pi SPI interface via GUI or raspi-config

Install the Python ST7735 from Pimoroni:

Python2

sudo apt update
sudo apt install python-rpi.gpio python-spidev python-pip python-pil python-numpy

sudo pip install st7735

Python3

sudo apt update
sudo apt install python3-rpi.gpio python3-spidev python3-pip python3-pil python3-numpy

sudo python3 -m pip install st7735

Run the python examples to make sure its working. This node fully rely on this installation to be working.

Install node-red-contrib-st7735s

cd ~/.node-red
npm install node-red-contrib-st7735s

or install it via NodeRed pallete manager.

Config:

Image text

The default value should be working for 0.96' ST7735S IPS LCD display. However, take note on the Width and Height values. The ST7735s has a Frame RAM of ST7735_COLS = 132 and ST7735_ROWS = 162. The number of columns is less than the columns of the display (160). Thus the width is set to 80 and the height to 160 then rotated 90 degree.

The default value of Offset Left and Offset Top is given by Python ST7735 library however it produces some undesirable artifacts on my testing unit. Setting it to:

Offset Left = 24
Offset Top = 0

seems to eliminate it.

Features

  • Tested with Raspberry Pi 4B.
  • In the examples directory there is a flow (example.json) that you can use for testing.
  • Read the node docs for details operation.
  • Be mindful of PlayGif and TextScroll node. These nodes needs to be stopped with StopGif and TextStop before drawing another stuff on the LCD.

If you are seeing this error when stopping the NodeRED:

Traceback (most recent call last):
  File "/home/pi/Pimoroni/node-red-contrib-st7735s/node_modules/pythonia/src/pythonia/interface.py", line 53, in <module>
    com_io()
  File "/home/pi/Pimoroni/node-red-contrib-st7735s/node_modules/pythonia/src/pythonia/interface.py", line 42, in com_io
    data = apiin.readline()
  File "/usr/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
KeyboardInterrupt

It is ok. It just the JSPyBridge things.

Please Contact Us

If you have any problem when using our package, please contact us..