Giter Site home page Giter Site logo

mwdle / vpa Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 96 KB

A stateful, multi-client, black & white, Node.js based artboard server. This project is a standalone port of IDC - I2C Display Controller (https://github.com/mwdle/IDC).

Home Page: https://vpa.mwdle.com/

License: GNU General Public License v3.0

Dockerfile 0.58% JavaScript 83.02% HTML 5.46% CSS 7.09% Python 3.85%
artboard artboards black-and-white docker docker-compose dockerfile drawing-app drawing-canvas javascript monochrome node-js nodejs websocket-client websockets

vpa's Introduction

Virtual Public Artboard

A stateful, multi-client, black & white public artboard server built with Node.js.
This project is a standalone port of the arduino based IDC - I2C Display Controller.

animated animated

Temporary: docker build -t mwdle/vpa:latest . docker compose -p vpa up -d (Change bind mounts - if using limit on file number, bind mount folders cannot contain any files not created by VPA.) openssl dgst -sha384 -binary script.js | openssl base64 -A trusted proxy range

THE REST OF THIS README IS COPEID FROM https://github.com/mwdle/IDC AND IS NOT UP TO DATE

Functionality:

  • Websockets server with interactive and stateful pixel canvas that mirrors input all webserver clients in realtime (http://<espIP>).
    • Users are able draw, erase, change brush size, clear the canvas, upload images to the canvas (via file selector or drag and drop), and download the canvas image.
    • Users are able to create and delete canvases on the server, and rotate between available canvases.
      • The currently selected canvas autosaves to a file every one second.
    • Uploaded images are automatically downscaled to 128x64 and converted to black and white. A few sample images to upload are available in the sampleImages folder.
      • Due to the limited physical display size, large and/or complex images may not appear as expected after processing.
      • For best results, upload images that are already black and white and/or a 2:1 aspect ratio (ideally 128x64 pixels).
  • Internet connection status indicator: Red onboard LED will illuminate whenever the ESP is not connected to a Wi-Fi network.
  • OTA Updates - includes ElegantOTA library to allow for Over-The-Air firmware and filesystem updates (http://<espIP>/update).

Specifications and things you should know

All builds were created and tested using the PlatformIO IDE extension for VSCode and Espressif ESP8266 NodeMCU board paired with a 2 pin .96 Inch 128x64 I2C SSD1306 OLED display. Mileage may vary using other boards, IDE's, and displays.

The following libraries/dependencies are required:

Network Info:

  • This program requires internet to function
  • You may need to change the subnet, gateway, and local_ip variables.
  • The recommended way of storing your Wi-Fi credentials is in a file named "secret" that must be placed in the data folder of this project, and loaded onto the filesystem as described in the filesystem section below.
    • The format of the secret file is ssid directly followed by a newline followed by password followed by another newline.
    • Ensure you secret file uses LF (\n) EOL sequence instead of CRLF (\r\n), otherwise the program will be unable to properly parse your Wi-Fi Credentials.
  • If you choose not to store your credentials in a file, you can simply set the main.cpp variables "ssid" and "password" accordingly.

Filesystem and Webpage Info:

  • The webpage resources required by this project must be uploaded to your microcontroller's filesystem independently of the compiled source code / firmware.
  • To upload the webpage resources to your microcontroller, in Arduino or PlatformIO, use the tool to build and upload the filesystem image. After doing so, you may build and upload the firmware.
  • The filesystem used for this project is LittleFS (as opposed to the deprecated SPIFFS).

Pinout Info:

  • errorLED is the pin of your onboard red LED. This program uses pin D0 (16) on the ESP8266 NodeMCU.
  • The display pins: SCL and SDA, default to pins D1 and D2, respectively, on the ESP8266. However, these defaults can be overriden by adding the following to the setup(): Wire.begin(sda, scl);

Websocket Type:

  • The following line must be uncommented in the WebSockets.h file of the ArduinoWebSockets library before building and uploading the project to your ESP8266:

    • #define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266_ASYNC
  • ALTERNATIVELY - Add the following line to the loop() function in main.cpp (performance will be slower than using the ASYNC websocket network type):

    • ws.loop();

License

  • This project is licensed under the GPL 3.0 license. However, please note that the images included in this repository are not covered by this license. For more information, see the IMAGES_LICENSE.txt file.

vpa's People

Contributors

mwdle 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.