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

@mshioji/node-red-contrib-mcu-draw-face

v0.1.2

Published

A simple node for drawing a face on an MCU screen.

Downloads

33

Readme

node-red-contrib-mcu-draw-face

A simple node for drawing a face on an MCU screen.

Table of Contents

  1. About
  2. What is Node-RED MCU?
  3. What is Stack-chan?
  4. Installation
  5. Usage
  6. Commands to change expressions
  7. Details of face properties
  8. Examples
  9. Contributing
  10. License

About

This node is used to display a simple face like Stack-chan on the MCU device. You can use this node with Node-RED MCU Edition.

What is Node-RED MCU?

Node-RED MCU Edition is a Node-RED runtime that runs on resource-constrained microcontrollers (MCUs) released by Mr. Peter Hoddie. Node-RED MCU product page is here: https://github.com/phoddie/node-red-mcu

What is Stack-chan?

Stack-chan is a super cute, palm-sized communication robot developed and released by Shishikawa-san.
Stack-chan product page is here: https://github.com/meganetaaan/stack-chan

Installation

To install this node, run the following command in your Node-RED user directory (typically ~/.node-red):

npm install git+https://github.com/mshioji/node-red-contrib-mcu-draw-face

Or, if it is already registered in npm, you can also install it with the following command:

npm install @mshioji/node-red-contrib-mcu-draw-face

Please restart Node-RED after installation.

Usage

To change the face display specifications:

Edit the face object properties on the property window of this node to change the default face. Or, obtain the face object output by sending a message to the node then change the properties like eye and mouth within the face object and input them into the node by storing them in msg.payload. You can also send only the properties that need to be changed instead of the entire face object. Please note face properties should be in msg.payload.face.

Commands to change expressions

You can change expressions by sending the face object each time, but some expressions have dedicated commands. Send the following strings in msg.payload.cmd to change the expression: Please note the "command" should be in msg.payload.cmd.

"blink": Blinks the eyes "wink": Winks "smile": Smiles "frown": Frowns "talk": Randomly updates the mouth shape to simulate talking "talk_stop": Stops the "talk" action "default": Resets the face display specifications to default

Details of face properties

You can change the face by editing the face object JSON in the property window. Following specifications are common to the case that sending the face object of msg.payload.face to the input terminal.

Eye Properties

pupillary_distance: Set the distance between the eyes. vPos: Vertical position from the top of the screen. Each eye (left and right) can have individual properties: enable: true or false to display or not display the item. x, y: Shift position from the original position. w, h: Width and height. rotation: Rotation of the item, set in degrees. arcStart: Start position of the arc, set in degrees. arcStop: Stop position of the arc, set in degrees. lineWidth: Width of the line. drawMode: Set "fill" or "stroke".

Mouth Properties

vPos: Vertical position from the top of the screen. enable: true or false to display or not display the item. shape: "line" or "oval". x, y: Shift position from the original position. w, h: Width and height. lineWidth: Width of the line. curveStrength: Positive number for a smile, negative number for a disgruntled face. rotation: Rotation of the item, set in degrees. arcStart: Start position of the arc, set in degrees. arcStop: Stop position of the arc, set in degrees. drawMode: Set "fill" or "stroke".

Examples

There is a example flows to get you started. Pelase refer "examples" folder.

Contributing

We welcome contributions! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request on GitHub.

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.