Code Monkey home page Code Monkey logo

pi-neosegment-api's Introduction

Docker Build Status

Read this to get started: https://blog.x5ff.xyz/blog/neosegment-pi-api/

Web API for the Neosegment display

Buy here: https://www.crowdsupply.com/maksmakes/neosegment

Usage

sudo docker run -d --privileged -p 3000:3000 -v ~/pi-neosegment-api/config.toml:/app/config.toml clma/pi-neosegment-api

Configuration

Take a look at the config.toml file for the options. For container environments (Kubernetes and such), these options are also available via environment variables! Each variable is prefixed by an N_, other than that the options are named the same as in the toml file.

[http]
port = 4000

becomes

set -x N_HTTP_PORT 4000 (in fish)

Web API

Spell 'hello' in random colors every 3 seconds ๐Ÿ‘

while true
    set color (random)
    curl -g "http://myhost.com:3000/api/v1/display/write?text=Hello&colors=[$color,$color,$color,$color,$color]&timeout=0"
    sleep 3
end

API parameters

Only GET is supported.

text    .. what to write. Length shouldn't matter.
colors  .. Color of each letter, so an array of decimal converted hex-colors.
timeout .. If a text exceeds the length of printable chars, when to scroll. Also affects time _before_ something is written.

Azure Service Bus

Configure appropriately in config.toml and whatever message is received will be displayed in a single color and with a 2 second timeout. (For now)

License

Apache 2.0

pi-neosegment-api's People

Contributors

celaus avatar

Stargazers

Maksim Surguy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.