├── .gitignore ├── CastCanvas ├── CastFlip │ ├── Adapter.js │ ├── Cast.js │ ├── Mona-Lisa.png │ ├── index.html │ ├── sketch.js │ └── style.css ├── FlipDots.js ├── README.md ├── dist │ ├── Videos.html │ ├── WaterSim-Side.0deafea2.js │ └── WaterSim-Side.0deafea2.js.map ├── package-lock.json └── package.json ├── FlipDot ├── FlipDot.pde ├── Panel.pde ├── cast.pde ├── config.pde ├── data │ └── fonts │ │ ├── PixeloidMono.ttf │ │ ├── PressStart2P.ttf │ │ ├── m3x6.ttf │ │ └── zxSpectrumStrictCondensed.ttf ├── example_anim.pde ├── example_blips.pde ├── example_cluster_growth.pde ├── games_tetris.pde ├── stage.pde └── ui.pde ├── LICENSE ├── README.md ├── assets ├── Binary.png ├── FlipDot-DIP-pins.png ├── FlipDot-Video.png ├── FlipDot-controller.gif ├── FlipDot-controller.png └── examples │ ├── example_3d_cube.gif │ ├── example_blips.gif │ ├── example_clouds.gif │ ├── example_cluster_growth.gif │ └── example_squares.gif ├── example_3d_cube.gif ├── example_blips.gif ├── example_clouds.gif ├── example_cluster_growth.gif └── example_squares.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # OSX 10 | .DS_Store 11 | 12 | # Dependency directories 13 | node_modules/ 14 | .cache/ 15 | ARCHIVE/ 16 | 17 | # dotenv environment variables file 18 | .env 19 | .env.test -------------------------------------------------------------------------------- /CastCanvas/CastFlip/Adapter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Adapter class 3 | * 4 | * Create FlipDot WebSocket adapter, builds frame data and casts. 5 | * 6 | * Expected data: 7 | * ip: IP address and port 8 | * id: Label for panel 9 | * panels: Array of panel IDs (eg.[0x01, 0x02, 0x03, 0x04]) 10 | * mapping: Function to map pixel data 11 | * imageData: 2bit array of image data 12 | */ 13 | class Adapter { 14 | constructor(config, canvas) { 15 | this.id = config.id; 16 | this.ip = config.ip; 17 | this.panels = config.panels; 18 | this.mapping = config.mapping; 19 | this.canvas = canvas; 20 | this.imageData = []; 21 | 22 | this.wsOpen = false; 23 | this.ws = false; 24 | 25 | // Connect WS 26 | this.connect(); 27 | } 28 | 29 | 30 | /** 31 | * Connect to WS device 32 | */ 33 | connect() { 34 | // Open WebSocket connection 35 | this.ws = new WebSocket(`ws://${this.ip}`); 36 | this.ws.binaryType = 'arraybuffer'; 37 | 38 | // WS open event 39 | this.ws.onopen = () => { 40 | // eslint-disable-next-line 41 | console.log(`Adapter ${this.id} WebSocket open`); 42 | this.wsOpen = true; 43 | }; 44 | 45 | // WS closed event 46 | this.ws.onclose = () => { 47 | // eslint-disable-next-line 48 | console.log(`Adapter ${this.id} WebSocket closed`); 49 | this.wsOpen = false; 50 | }; 51 | 52 | // WS error event 53 | this.ws.onerror = (evt) => { 54 | // eslint-disable-next-line 55 | console.log(`Adapter ${this.id} WebSocket error`); 56 | console.log(evt); 57 | }; 58 | 59 | // WS message received 60 | this.ws.onmessage = (evt) => { 61 | // eslint-disable-next-line 62 | console.log(`Adapter ${this.id} WebSocket message: ${evt.data}`); 63 | }; 64 | 65 | // Close connection on page exit. 66 | window.addEventListener('unload', e => { 67 | this.ws.close(); 68 | }); 69 | } 70 | 71 | 72 | /** 73 | * Cast frame of panels to adapter 74 | */ 75 | cast(imageData) { 76 | // Is WS open? 77 | if (!this.wsOpen) { 78 | return; 79 | } 80 | 81 | // Update processed image data 82 | this.imageData = imageData; 83 | 84 | // Build frame buffer 85 | const buffer = this.frameBuffer(); 86 | 87 | // Send data! 88 | this.ws.send(buffer); 89 | } 90 | 91 | 92 | /** 93 | * Build frame buffer 94 | * 95 | * @returns {Uint8Array} Frame buffer data 96 | */ 97 | frameBuffer() { 98 | // Each panels data 99 | const adapterBuffer = []; 100 | this.panels.forEach((panel) => { 101 | adapterBuffer.push(...this.panelData(panel)); 102 | }); 103 | 104 | // Refresh all panels command 105 | const refreshAllPanels = [0x80, 0x82, 0x8F]; 106 | adapterBuffer.push(...adapterBuffer, ...refreshAllPanels); 107 | 108 | // Return complete frame buffer 109 | return new Uint8Array(adapterBuffer); 110 | } 111 | 112 | 113 | /** 114 | * Build panel buffer. 115 | * 116 | * @param {int8} panel Panel number 117 | * @returns {Array(int8)} Frame data 118 | */ 119 | panelData(panel) { 120 | // Panel header 121 | const bufferHeader = [ 122 | 0x80, // Start 123 | 0x84, // Command 0x83 (28bits, Refresh, 28x7) 124 | // 0x84 (28bits, No refresh, 28x7) (requires a further 0x82 to refresh) 125 | panel, 126 | ]; 127 | 128 | // Image data 129 | const bufferData = this.panelImageData(panel); 130 | 131 | // Closure 132 | const bufferFooter = [0x8F]; 133 | 134 | // Concat all data 135 | return [...bufferHeader, ...bufferData, ...bufferFooter]; 136 | } 137 | 138 | 139 | /** 140 | * 141 | * @param {*} panel 142 | * @returns 143 | */ 144 | panelImageData(panel) { 145 | const panelBuffer = []; 146 | 147 | // Loop columns in panel 148 | for (let c = 0; c < 28; c++) { 149 | const positionX = c + this.mapping.offset.x; 150 | const positionY = ((panel - 1) * 7) + this.mapping.offset.y; 151 | const index = (positionY * this.canvas.width) + positionX; 152 | 153 | // Build uint8 byte 154 | const binary = []; 155 | for (let bit = 7 - 1; bit >= 0; bit--) { 156 | binary.push(this.imageData[index + (bit * this.canvas.width)]); 157 | } 158 | 159 | // Parse binary 160 | panelBuffer.push(parseInt(binary.join(''), 2)); 161 | } 162 | 163 | return panelBuffer; 164 | } 165 | } -------------------------------------------------------------------------------- /CastCanvas/CastFlip/Cast.js: -------------------------------------------------------------------------------- 1 | 2 | class Cast { 3 | constructor(settings) { 4 | this.canvas = settings.canvas; 5 | this.blackWhiteSplit = settings.blackWhiteSplit; 6 | 7 | this.adapters = []; 8 | this.createAdapters(settings.adapters); 9 | } 10 | 11 | 12 | createAdapters(adapters) { 13 | adapters.forEach((adapter) => { 14 | this.adapters.push(new Adapter(adapter, this.canvas)); 15 | }); 16 | } 17 | 18 | 19 | 20 | /** 21 | * Cast canvas to matrix. 22 | * @param {DOM Canvas} canvas 23 | */ 24 | cast(canvas) { 25 | const imageData = this.getImageData(canvas); 26 | 27 | this.adapters.forEach((adapter) => { 28 | adapter.cast(imageData); 29 | }); 30 | } 31 | 32 | 33 | /** 34 | * Get image data and convert it into 2bit array. 35 | * 36 | * @param {HTML canvas} canvas 37 | * @returns {array/Int2} 2bit image array 38 | */ 39 | getImageData(canvas) { 40 | const canvasData = this.getContext(canvas); 41 | return this.convertRGBtoBW(canvasData.data); 42 | } 43 | 44 | 45 | /** 46 | * Convert image to Black&White 47 | * @param {Array} data RGB image buffer array 48 | * @return {Array} Black & White image array (range: 0-1) 49 | */ 50 | convertRGBtoBW(data) { 51 | const outputBW = []; 52 | 53 | // Loop over RGB array 54 | for (let i = 0; i < data.length; i += 4) { 55 | const grayscale = (data[i] * 0.3) + (data[i + 1] * 0.59) + (data[i + 2] * 0.11); 56 | outputBW.push(grayscale < this.blackWhiteSplit ? 0 : 1); 57 | } 58 | 59 | // Return Black/White array 60 | return outputBW; 61 | } 62 | 63 | 64 | /** 65 | * Gets the canvas context. 66 | * 2D or WebGL 67 | * @param {DOM Canvas} canvas HTML Canvas element 68 | * @return {Canvas context} canvas Canvas context 69 | */ 70 | getContext(canvas) { 71 | let ctx; 72 | if (this.canvas.type === '2d') { 73 | ctx = canvas.getContext('2d'); 74 | return ctx.getImageData(0, 0, this.canvas.width, this.canvas.height); 75 | } 76 | else if (this.canvas.type === 'webgl') { 77 | ctx = canvas.getContext('webgl', { 78 | antialias: false, 79 | depth: false, 80 | }); 81 | return ctx.readPixels(0, 0, this.canvas.width, this.canvas.height); 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /CastCanvas/CastFlip/Mona-Lisa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/CastCanvas/CastFlip/Mona-Lisa.png -------------------------------------------------------------------------------- /CastCanvas/CastFlip/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /CastCanvas/CastFlip/sketch.js: -------------------------------------------------------------------------------- 1 | let cast; 2 | let img; 3 | 4 | 5 | function preload() { 6 | img = loadImage('Mona-Lisa.png') 7 | } 8 | 9 | 10 | function setup() { 11 | createCanvas(28, 28); 12 | pixelDensity(1); 13 | 14 | display = { 15 | adapters: [ 16 | { 17 | ip: '192.168.1.21:8000', 18 | id: '#1', 19 | panels: [0x01, 0x02, 0x03, 0x04], 20 | mapping: { 21 | offset: { 22 | x: 0, 23 | y: 0 24 | } 25 | }, 26 | } 27 | ], 28 | blackWhiteSplit: 127, 29 | canvas: { 30 | type: '2d', 31 | width: 28, 32 | height: 28 33 | } 34 | }; 35 | 36 | // Start WS Matrix 37 | cast = new Cast(display); 38 | 39 | 40 | frameRate(15); 41 | } 42 | 43 | 44 | function draw() { 45 | background(0); 46 | 47 | image(img, 0, 0); 48 | // stroke(255); 49 | // strokeWeight(2); 50 | // translate(width / 2, height / 2); 51 | // rotate(frameCount / 20); 52 | // strokeWeight(2); 53 | // stroke(255); 54 | // line(-width, 0, width, 0); 55 | // line(0, -height, 0, height); 56 | 57 | 58 | 59 | // Cast data 60 | const p5canvas = document.getElementById('defaultCanvas0'); 61 | cast.cast(p5canvas); 62 | } 63 | 64 | 65 | -------------------------------------------------------------------------------- /CastCanvas/CastFlip/style.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | canvas { 6 | display: block; 7 | } 8 | -------------------------------------------------------------------------------- /CastCanvas/FlipDots.js: -------------------------------------------------------------------------------- 1 | /** 2 | * FlipDots 3 | * Author: Owen McAteer 4 | * URL: https://github.com/owenmcateer/FlipDots 5 | * 6 | * FlipDot is a kinetic display I use for interactive art and animations. 7 | * This repo contains all the information and code to set one up and get 8 | * it connected to a computer. 9 | * This script will accept any image array buffer over WebSockets, desaturate 10 | * and scale to B/W, convert to FlipDot data and push out over USB. 11 | * 12 | * Usage 13 | * 1) Run `node install` 14 | * 2) Run `node FlipDots.js` and find your USB-to-RS485 adaptor port address. 15 | * 3) Open *FlipDots.js* and in config, enter this port address 16 | * 4) Still in *FlipDops.js* edit your panel settings (size & IDs) 17 | * 5) Again run `node FlipDots.js` and look for "Serial port opened and ready!" 18 | * 6) Now stream image data from Canvas Cast (https://github.com/owenmcateer/canvas-cast) 19 | * 20 | * 21 | * FlipDot DIP pin setup. 22 | * For more help see: 23 | * https://github.com/owenmcateer/FlipDots 24 | * 25 | * Baud-rate pins (3-pin DIP) 26 | * Value | ON | Speed 27 | * ------|-----|-------- 28 | * 0 | ↓↓↓ | N/A 29 | * 1 | ↑↓↓ | N/A 30 | * 2 | ↓↑↓ | N/A 31 | * 3 | ↑↑↓ | 9600 32 | * 4 | ↓↓↑ | 19200 33 | * 5 | ↑↓↑ | 38400 34 | * 6 | ↓↑↑ | 57600 35 | * 7 | ↑↑↑ | 9600 36 | * ------|-----|-------- 37 | * | OFF | 38 | * 39 | * Address (8-pin DIP) 40 | * This is the address ID used when pushing out the image data, each panel listents for its data. 41 | * Pins | Description 42 | * -----|-------------- 43 | * 0-5 | Address in binary code (natural) 44 | * 6 | Magnetizing time: OFF: 500μs(default), ON: 450μs 45 | * 7 | Test mode: ON/OFF. OFF = normal operation 46 | * -----|-------------- 47 | */ 48 | 49 | const config = { 50 | serialPort: '', // ie. (COM1, /dev/tty-usbserial1) 51 | baudRate: 19200, 52 | serverPort: 8081, 53 | // Panels 54 | cols: 28, 55 | rows: 7, 56 | panels: [0x01, 0x02], 57 | blackWhiteSplit: 127, // When to split black/white (0-255) 58 | }; 59 | 60 | console.log('---\nWelcome to FlipDots\n---'); 61 | 62 | /** 63 | * Serial connection 64 | */ 65 | const SerialPort = require('serialport'); 66 | // List available serila devices 67 | SerialPort.list().then((ports) => { 68 | console.log('---\nAvailable devices found:'); 69 | ports.forEach((port) => { 70 | console.log(`${port.path}\t${port.manufacturer}`); 71 | }); 72 | console.log('---'); 73 | }); 74 | 75 | // Connect to device 76 | const serialDevice = new SerialPort(config.serialPort, { 77 | baudRate: config.baudRate, 78 | dataBits: 8, 79 | stopBits: 1, 80 | parity: 'none', 81 | timeout: 1, 82 | }); 83 | 84 | // Serial device is reporting an error 85 | serialDevice.on('error', (err) => { 86 | console.log('Serial port error: ', err.message); 87 | if (wsClient) { 88 | wsClient.send('Closed'); 89 | } 90 | }); 91 | 92 | // Serial device connection has opened 93 | serialDevice.on('open', () => { 94 | console.log('Serial port opened and ready!'); 95 | if (wsClient) { 96 | wsClient.send('Connected'); 97 | } 98 | }); 99 | 100 | // Serial device connection closed 101 | serialDevice.on('close', () => { 102 | console.log('Serial port closed.'); 103 | if (wsClient) { 104 | wsClient.send('Closed'); 105 | } 106 | }); 107 | 108 | // Message received from serial device 109 | serialDevice.on('read', (msg) => { 110 | console.log('Serial message:'); 111 | console.log(msg); 112 | }); 113 | 114 | 115 | /** 116 | * WebSocket 117 | */ 118 | let wsClient; 119 | const WebSocketServer = require('ws').Server; 120 | 121 | // Start WebSocket Server 122 | const wss = new WebSocketServer({port: config.serverPort}); 123 | console.log(`WebSocket running at: localhost:${config.serverPort}`); 124 | 125 | // On connection 126 | wss.on('connection', (client) => { 127 | // Only allow one client 128 | if (wsClient) { 129 | client.send('Busy'); 130 | client.close(); 131 | return; 132 | } 133 | 134 | // Welcome new user 135 | wsClient = client; 136 | wsClient.send('Connected'); 137 | 138 | // On message 139 | wsClient.on('message', onMessage); 140 | 141 | // On close 142 | wsClient.on('close', () => onClose(client)); 143 | }); 144 | 145 | // On WS close 146 | function onClose(client) { 147 | console.log('Client quit'); 148 | client.send('Goodbye'); 149 | wsClient = null; 150 | } 151 | 152 | // WebSocket has received a message/data 153 | function onMessage(data) { 154 | switch (typeof data) { 155 | // Frame of data received as an object 156 | case 'object': 157 | // Process data 158 | flipDotProcessFrame(data); 159 | break; 160 | 161 | default: 162 | console.error(`Unknown data recieved of type: ${typeof data}`); 163 | } 164 | } 165 | 166 | 167 | /** 168 | * FlipDot 169 | */ 170 | function flipDotProcessFrame(data) { 171 | // Convert image to black & white 172 | const bwData = convertRGBtoBW(data); 173 | 174 | // Convert image to FlipDot binary 175 | const flipDotBufferHex = createBuffer(bwData); 176 | 177 | // Output panel 178 | for (let panel = 0; panel < flipDotBufferHex.length; panel++) { 179 | // Build image buffer 180 | const buffer = buildFrameBuffer(panel, flipDotBufferHex[panel]); 181 | 182 | // Send frame to device 183 | serialDevice.write(buffer); 184 | } 185 | 186 | // Refresh all displays 187 | serialDevice.write(Buffer.from([0x80, 0x82, 0x8F])); 188 | } 189 | 190 | 191 | /** 192 | * Conver image to Black&White 193 | * @param {Array} data RGB image buffer array 194 | * @return {Array} Black & White image array (range: 0-1) 195 | */ 196 | function convertRGBtoBW(data) { 197 | const outputBW = []; 198 | 199 | // Loop over RGB array 200 | for (let i = 0; i < data.length; i += 3) { 201 | const grayscale = (data[i] * 0.3) + (data[i + 1] * 0.59) + (data[i + 2] * 0.11); 202 | outputBW.push(grayscale < config.blackWhiteSplit ? 0 : 1); 203 | } 204 | 205 | // Return Black/White array 206 | return outputBW; 207 | } 208 | 209 | 210 | /** 211 | * Create FlipFot buffer split into panels. 212 | * Panels -> Column value. 213 | * 214 | * @param {Array} data 2bit image array 215 | * @return {Array} FlipDot panels and image buffer 216 | */ 217 | function createBuffer(data) { 218 | // How many panels? 219 | const panelBuffer = new Array(data.length / (config.rows * config.cols)); 220 | 221 | // Loop panels 222 | for (let panel = 0; panel < panelBuffer.length; panel++) { 223 | panelBuffer[panel] = []; 224 | 225 | // Loop columns in panel 226 | for (let c = 0; c < config.cols; c++) { 227 | const index = (panel * config.rows * config.cols) + c; 228 | const binary = []; 229 | for (let bit = config.rows - 1; bit >= 0; bit--) { 230 | binary.push(data[index + (bit * config.cols)]); 231 | } 232 | // Parse binary 233 | panelBuffer[panel].push(parseInt(binary.join(''), 2)); 234 | } 235 | } 236 | 237 | // Return completed buffer 238 | return panelBuffer; 239 | } 240 | 241 | 242 | /** 243 | * Build panel buffer to send. 244 | * 245 | * @param {int} panel Panel number. 246 | * @param {BufferArray} frameData Image data buffer array 247 | * @return {BufferArray} Buffer data ready to send to device 248 | */ 249 | function buildFrameBuffer(panel, frameData) { 250 | // Headers 251 | const dataHeader = Buffer.from([ 252 | 0x80, // Start 253 | 0x84, // Command 0x83 (28bits, Refresh, 28x7) 254 | // 0x84 (28bits, No refresh, 28x7) (requires a further 0x82 to refresh) 255 | panel + 1, 256 | ]); 257 | 258 | // Footer 259 | const dataFooter = Buffer.from([0x8F]); 260 | 261 | // Concat all data 262 | const cmdBytearray = Buffer.concat([dataHeader, Buffer.from(frameData), dataFooter], dataHeader.length + frameData.length + dataFooter.length); 263 | 264 | // Return final buffer 265 | return cmdBytearray; 266 | } 267 | -------------------------------------------------------------------------------- /CastCanvas/README.md: -------------------------------------------------------------------------------- 1 | # FlipDots CastCanvas 2 | 3 | This script will accept any image array buffer over WebSockets, desaturate & scale to B/W, convert to FlipDot data and push out over USB. 4 | 5 | 6 | ## What are FlipDot displays? 7 | 8 | Flip-dots or Flip-disc, are made of small disks with a permanent magnetic that physically flip back and forth revealing one side or the other. Powered by a small electromagnetic to flip it retains its state even after power is disconnected. Click here if you’d like to [know more](https://flipdots.com/en/electromagnetic-flip-disc-technology-how-it-works/). 9 | 10 | The AlfaZeta XY5 FlipDot display includes its own controller board that communicates over a RS485 serial connection using its own protocol. This repo simplifies connecting and streaming images to the FlipDot display. 11 | 12 | 13 | ## FlipDots in action 14 | [![Motus Art FlipDot](../assets/FlipDot-Video.png)](https://www.instagram.com/p/CCBpNmXCr6o/) 15 | 16 | 17 | ## Requirements 18 | - [AlfaZeta](https://flipdots.com/) FlipDot display 19 | - Power supply 24V 1A 20 | - USB-to-RS485 adaptor 21 | - RJ11 cable / wire 22 | 23 | 24 | ## Quick start, I can't wait! 25 | Flip pin 8 of the DIP switch on, connect power and enjoy demo mode. 26 | 27 | 28 | ## Wiring 29 | 30 | See https://github.com/owenmcateer/FlipDots 31 | 32 | 33 | ## Communicating 34 | 35 | Data is sent to the FlipDots over RS485 serial connection. Each byte of data sets 7 dots in a single column on/off. Running from bottom to top, left to right. See the example below. 36 | ![FlipDot controller](../assets/Binary.png) 37 | 38 | This Git repo script will accept any image array buffer over WebSockets, desaturate & scale to B/W, convert to FlipDot data and push out over USB. 39 | 40 | To make this even easier you can use my [Canvas Cast](https://github.com/owenmcateer/canvas-cast) program to easily stream any HTML canvas over WebSockets to the FlipDot display. 41 | 42 | **Usage** 43 | 1) Run `npm install` 44 | 2) Run `node FlipDots.js` and find your USB-to-RS485 adaptor port address. 45 | 3) Open *FlipDots.js* and in config, enter this port address 46 | 4) Still in *FlipDots.js* edit your panel settings (size & IDs) 47 | 5) Again run `node FlipDots.js` and look for "Serial port opened and ready!" 48 | 6) Now stream image data from [Canvas Cast](https://github.com/owenmcateer/canvas-cast) 49 | -------------------------------------------------------------------------------- /CastCanvas/dist/Videos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Canvas Cast (Serial) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | Matrix brightness: 16 | 0% 17 | 18 | 100% 19 |
20 | 21 |

Canvas Cast

22 |
23 |
24 |
25 |
26 | 27 | 28 | 29 | 120 | 121 | -------------------------------------------------------------------------------- /CastCanvas/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flipdots", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "flipdots", 9 | "version": "1.0.0", 10 | "license": "gpl-3.0", 11 | "dependencies": { 12 | "serialport": "^9.0.0", 13 | "ws": "^7.5.10" 14 | } 15 | }, 16 | "node_modules/@serialport/binding-abstract": { 17 | "version": "9.2.3", 18 | "resolved": "https://registry.npmjs.org/@serialport/binding-abstract/-/binding-abstract-9.2.3.tgz", 19 | "integrity": "sha512-cQs9tbIlG3P0IrOWyVirqlhWuJ7Ms2Zh9m2108z6Y5UW/iVj6wEOiW8EmK9QX9jmJXYllE7wgGgvVozP5oCj3w==", 20 | "dependencies": { 21 | "debug": "^4.3.2" 22 | }, 23 | "engines": { 24 | "node": ">=10.0.0" 25 | }, 26 | "funding": { 27 | "url": "https://opencollective.com/serialport/donate" 28 | } 29 | }, 30 | "node_modules/@serialport/binding-mock": { 31 | "version": "9.0.0", 32 | "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-9.0.0.tgz", 33 | "integrity": "sha512-E65ZbykGwZSoHpQvjuJkTbwEM0uZku+SROtO+VMs/mShMalBnOSoRDU2IedkFKvz6IqowZZOVyaBUbnKYoAUuQ==", 34 | "dependencies": { 35 | "@serialport/binding-abstract": "^9.0.0", 36 | "debug": "^4.1.1" 37 | }, 38 | "engines": { 39 | "node": ">=8.6.0" 40 | } 41 | }, 42 | "node_modules/@serialport/bindings": { 43 | "version": "9.2.8", 44 | "resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-9.2.8.tgz", 45 | "integrity": "sha512-hSLxTe0tADZ3LMMGwvEJWOC/TaFQTyPeFalUCsJ1lSQ0k6bPF04JwrtB/C81GetmDBTNRY0GlD0SNtKCc7Dr5g==", 46 | "hasInstallScript": true, 47 | "dependencies": { 48 | "@serialport/binding-abstract": "9.2.3", 49 | "@serialport/parser-readline": "9.2.4", 50 | "bindings": "^1.5.0", 51 | "debug": "^4.3.2", 52 | "nan": "^2.15.0", 53 | "prebuild-install": "^7.0.0" 54 | }, 55 | "engines": { 56 | "node": ">=10.0.0" 57 | }, 58 | "funding": { 59 | "url": "https://opencollective.com/serialport/donate" 60 | } 61 | }, 62 | "node_modules/@serialport/parser-byte-length": { 63 | "version": "9.0.0", 64 | "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-9.0.0.tgz", 65 | "integrity": "sha512-MaXWTqxz9SeWaN488uFhDMA3cy2sQFoGHDQqDpy6q9wBGlPBe+UpRAznzOoNPkAehqyPo1Vc7gxYsBfgjZtWaw==", 66 | "engines": { 67 | "node": ">=8.6.0" 68 | } 69 | }, 70 | "node_modules/@serialport/parser-cctalk": { 71 | "version": "9.0.0", 72 | "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-9.0.0.tgz", 73 | "integrity": "sha512-tFJRF+uceEMYQeOLi92CYr1SScnI+2QLkawNHaVwwcmLV0ezwmsm1hvwBCWHkWDsY6U1SiElNJ5HpF89kS28zQ==", 74 | "engines": { 75 | "node": ">=8.6.0" 76 | } 77 | }, 78 | "node_modules/@serialport/parser-delimiter": { 79 | "version": "9.2.4", 80 | "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-9.2.4.tgz", 81 | "integrity": "sha512-4nvTAoYAgkxFiXrkI+3CA49Yd43CODjeszh89EK+I9c8wOZ+etZduRCzINYPiy26g7zO+GRAb9FoPCsY+sYcbQ==", 82 | "engines": { 83 | "node": ">=10.0.0" 84 | }, 85 | "funding": { 86 | "url": "https://opencollective.com/serialport/donate" 87 | } 88 | }, 89 | "node_modules/@serialport/parser-readline": { 90 | "version": "9.2.4", 91 | "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-9.2.4.tgz", 92 | "integrity": "sha512-Z1/qrZTQUVhNSJP1hd9YfDvq0o7d87rNwAjjRKbVpa7Qi51tG5BnKt43IV3NFMyBlVcRe0rnIb3tJu57E0SOwg==", 93 | "dependencies": { 94 | "@serialport/parser-delimiter": "9.2.4" 95 | }, 96 | "engines": { 97 | "node": ">=10.0.0" 98 | }, 99 | "funding": { 100 | "url": "https://opencollective.com/serialport/donate" 101 | } 102 | }, 103 | "node_modules/@serialport/parser-ready": { 104 | "version": "9.0.0", 105 | "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-9.0.0.tgz", 106 | "integrity": "sha512-oSQR7773Jdc6SjXMA1mWgfFlyBLcIRlZtt1BJMfO07k3ynBmanJ4VysVDTDvxtsREHLgcjoLRKQC/6wl2wvXOQ==", 107 | "engines": { 108 | "node": ">=8.6.0" 109 | } 110 | }, 111 | "node_modules/@serialport/parser-regex": { 112 | "version": "9.0.0", 113 | "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-9.0.0.tgz", 114 | "integrity": "sha512-Q4LDXbWnun5r1ML6ZLS5Wb2BurnkJjtP1geHtZbshLUmpfms++Q28li8OPzv/KQ6praC1HDRG37D0AY6xoObSw==", 115 | "engines": { 116 | "node": ">=8.6.0" 117 | } 118 | }, 119 | "node_modules/@serialport/stream": { 120 | "version": "9.0.0", 121 | "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-9.0.0.tgz", 122 | "integrity": "sha512-JK952xKP+7PX3tXj9DgKafQaAru0sdbkTIY1OpjUNGp0xYWTVUbZRnLK//MLkH6FpoDTJc9ghN2ILK0YRtpLLA==", 123 | "dependencies": { 124 | "debug": "^4.1.1" 125 | }, 126 | "engines": { 127 | "node": ">=8.6.0" 128 | } 129 | }, 130 | "node_modules/ansi-regex": { 131 | "version": "2.1.1", 132 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 133 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", 134 | "engines": { 135 | "node": ">=0.10.0" 136 | } 137 | }, 138 | "node_modules/aproba": { 139 | "version": "1.2.0", 140 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", 141 | "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" 142 | }, 143 | "node_modules/are-we-there-yet": { 144 | "version": "1.1.7", 145 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", 146 | "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", 147 | "dependencies": { 148 | "delegates": "^1.0.0", 149 | "readable-stream": "^2.0.6" 150 | } 151 | }, 152 | "node_modules/base64-js": { 153 | "version": "1.5.1", 154 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 155 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 156 | "funding": [ 157 | { 158 | "type": "github", 159 | "url": "https://github.com/sponsors/feross" 160 | }, 161 | { 162 | "type": "patreon", 163 | "url": "https://www.patreon.com/feross" 164 | }, 165 | { 166 | "type": "consulting", 167 | "url": "https://feross.org/support" 168 | } 169 | ] 170 | }, 171 | "node_modules/bindings": { 172 | "version": "1.5.0", 173 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 174 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 175 | "dependencies": { 176 | "file-uri-to-path": "1.0.0" 177 | } 178 | }, 179 | "node_modules/bl": { 180 | "version": "4.1.0", 181 | "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", 182 | "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", 183 | "dependencies": { 184 | "buffer": "^5.5.0", 185 | "inherits": "^2.0.4", 186 | "readable-stream": "^3.4.0" 187 | } 188 | }, 189 | "node_modules/bl/node_modules/readable-stream": { 190 | "version": "3.6.0", 191 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 192 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 193 | "dependencies": { 194 | "inherits": "^2.0.3", 195 | "string_decoder": "^1.1.1", 196 | "util-deprecate": "^1.0.1" 197 | }, 198 | "engines": { 199 | "node": ">= 6" 200 | } 201 | }, 202 | "node_modules/buffer": { 203 | "version": "5.7.1", 204 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 205 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 206 | "funding": [ 207 | { 208 | "type": "github", 209 | "url": "https://github.com/sponsors/feross" 210 | }, 211 | { 212 | "type": "patreon", 213 | "url": "https://www.patreon.com/feross" 214 | }, 215 | { 216 | "type": "consulting", 217 | "url": "https://feross.org/support" 218 | } 219 | ], 220 | "dependencies": { 221 | "base64-js": "^1.3.1", 222 | "ieee754": "^1.1.13" 223 | } 224 | }, 225 | "node_modules/chownr": { 226 | "version": "1.1.4", 227 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 228 | "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" 229 | }, 230 | "node_modules/code-point-at": { 231 | "version": "1.1.0", 232 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 233 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", 234 | "engines": { 235 | "node": ">=0.10.0" 236 | } 237 | }, 238 | "node_modules/console-control-strings": { 239 | "version": "1.1.0", 240 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 241 | "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" 242 | }, 243 | "node_modules/core-util-is": { 244 | "version": "1.0.3", 245 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 246 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" 247 | }, 248 | "node_modules/debug": { 249 | "version": "4.3.3", 250 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", 251 | "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", 252 | "dependencies": { 253 | "ms": "2.1.2" 254 | }, 255 | "engines": { 256 | "node": ">=6.0" 257 | }, 258 | "peerDependenciesMeta": { 259 | "supports-color": { 260 | "optional": true 261 | } 262 | } 263 | }, 264 | "node_modules/decompress-response": { 265 | "version": "6.0.0", 266 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", 267 | "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", 268 | "dependencies": { 269 | "mimic-response": "^3.1.0" 270 | }, 271 | "engines": { 272 | "node": ">=10" 273 | }, 274 | "funding": { 275 | "url": "https://github.com/sponsors/sindresorhus" 276 | } 277 | }, 278 | "node_modules/deep-extend": { 279 | "version": "0.6.0", 280 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 281 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", 282 | "engines": { 283 | "node": ">=4.0.0" 284 | } 285 | }, 286 | "node_modules/delegates": { 287 | "version": "1.0.0", 288 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 289 | "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" 290 | }, 291 | "node_modules/detect-libc": { 292 | "version": "2.0.0", 293 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.0.tgz", 294 | "integrity": "sha512-S55LzUl8HUav8l9E2PBTlC5PAJrHK7tkM+XXFGD+fbsbkTzhCpG6K05LxJcUOEWzMa4v6ptcMZ9s3fOdJDu0Zw==", 295 | "engines": { 296 | "node": ">=8" 297 | } 298 | }, 299 | "node_modules/end-of-stream": { 300 | "version": "1.4.4", 301 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 302 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 303 | "dependencies": { 304 | "once": "^1.4.0" 305 | } 306 | }, 307 | "node_modules/expand-template": { 308 | "version": "2.0.3", 309 | "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", 310 | "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", 311 | "engines": { 312 | "node": ">=6" 313 | } 314 | }, 315 | "node_modules/file-uri-to-path": { 316 | "version": "1.0.0", 317 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 318 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 319 | }, 320 | "node_modules/fs-constants": { 321 | "version": "1.0.0", 322 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 323 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" 324 | }, 325 | "node_modules/gauge": { 326 | "version": "2.7.4", 327 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", 328 | "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", 329 | "dependencies": { 330 | "aproba": "^1.0.3", 331 | "console-control-strings": "^1.0.0", 332 | "has-unicode": "^2.0.0", 333 | "object-assign": "^4.1.0", 334 | "signal-exit": "^3.0.0", 335 | "string-width": "^1.0.1", 336 | "strip-ansi": "^3.0.1", 337 | "wide-align": "^1.1.0" 338 | } 339 | }, 340 | "node_modules/github-from-package": { 341 | "version": "0.0.0", 342 | "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", 343 | "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" 344 | }, 345 | "node_modules/has-unicode": { 346 | "version": "2.0.1", 347 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 348 | "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" 349 | }, 350 | "node_modules/ieee754": { 351 | "version": "1.2.1", 352 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 353 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 354 | "funding": [ 355 | { 356 | "type": "github", 357 | "url": "https://github.com/sponsors/feross" 358 | }, 359 | { 360 | "type": "patreon", 361 | "url": "https://www.patreon.com/feross" 362 | }, 363 | { 364 | "type": "consulting", 365 | "url": "https://feross.org/support" 366 | } 367 | ] 368 | }, 369 | "node_modules/inherits": { 370 | "version": "2.0.4", 371 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 372 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 373 | }, 374 | "node_modules/ini": { 375 | "version": "1.3.8", 376 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", 377 | "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" 378 | }, 379 | "node_modules/is-fullwidth-code-point": { 380 | "version": "1.0.0", 381 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 382 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 383 | "dependencies": { 384 | "number-is-nan": "^1.0.0" 385 | }, 386 | "engines": { 387 | "node": ">=0.10.0" 388 | } 389 | }, 390 | "node_modules/isarray": { 391 | "version": "1.0.0", 392 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 393 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 394 | }, 395 | "node_modules/lru-cache": { 396 | "version": "6.0.0", 397 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 398 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 399 | "dependencies": { 400 | "yallist": "^4.0.0" 401 | }, 402 | "engines": { 403 | "node": ">=10" 404 | } 405 | }, 406 | "node_modules/mimic-response": { 407 | "version": "3.1.0", 408 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", 409 | "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", 410 | "engines": { 411 | "node": ">=10" 412 | }, 413 | "funding": { 414 | "url": "https://github.com/sponsors/sindresorhus" 415 | } 416 | }, 417 | "node_modules/minimist": { 418 | "version": "1.2.6", 419 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", 420 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" 421 | }, 422 | "node_modules/mkdirp-classic": { 423 | "version": "0.5.3", 424 | "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", 425 | "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" 426 | }, 427 | "node_modules/ms": { 428 | "version": "2.1.2", 429 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 430 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 431 | }, 432 | "node_modules/nan": { 433 | "version": "2.15.0", 434 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", 435 | "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" 436 | }, 437 | "node_modules/napi-build-utils": { 438 | "version": "1.0.2", 439 | "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", 440 | "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" 441 | }, 442 | "node_modules/node-abi": { 443 | "version": "3.5.0", 444 | "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.5.0.tgz", 445 | "integrity": "sha512-LtHvNIBgOy5mO8mPEUtkCW/YCRWYEKshIvqhe1GHHyXEHEB5mgICyYnAcl4qan3uFeRROErKGzatFHPf6kDxWw==", 446 | "dependencies": { 447 | "semver": "^7.3.5" 448 | }, 449 | "engines": { 450 | "node": ">=10" 451 | } 452 | }, 453 | "node_modules/npmlog": { 454 | "version": "4.1.2", 455 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", 456 | "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", 457 | "dependencies": { 458 | "are-we-there-yet": "~1.1.2", 459 | "console-control-strings": "~1.1.0", 460 | "gauge": "~2.7.3", 461 | "set-blocking": "~2.0.0" 462 | } 463 | }, 464 | "node_modules/number-is-nan": { 465 | "version": "1.0.1", 466 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 467 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", 468 | "engines": { 469 | "node": ">=0.10.0" 470 | } 471 | }, 472 | "node_modules/object-assign": { 473 | "version": "4.1.1", 474 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 475 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 476 | "engines": { 477 | "node": ">=0.10.0" 478 | } 479 | }, 480 | "node_modules/once": { 481 | "version": "1.4.0", 482 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 483 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 484 | "dependencies": { 485 | "wrappy": "1" 486 | } 487 | }, 488 | "node_modules/prebuild-install": { 489 | "version": "7.0.1", 490 | "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.0.1.tgz", 491 | "integrity": "sha512-QBSab31WqkyxpnMWQxubYAHR5S9B2+r81ucocew34Fkl98FhvKIF50jIJnNOBmAZfyNV7vE5T6gd3hTVWgY6tg==", 492 | "dependencies": { 493 | "detect-libc": "^2.0.0", 494 | "expand-template": "^2.0.3", 495 | "github-from-package": "0.0.0", 496 | "minimist": "^1.2.3", 497 | "mkdirp-classic": "^0.5.3", 498 | "napi-build-utils": "^1.0.1", 499 | "node-abi": "^3.3.0", 500 | "npmlog": "^4.0.1", 501 | "pump": "^3.0.0", 502 | "rc": "^1.2.7", 503 | "simple-get": "^4.0.0", 504 | "tar-fs": "^2.0.0", 505 | "tunnel-agent": "^0.6.0" 506 | }, 507 | "bin": { 508 | "prebuild-install": "bin.js" 509 | }, 510 | "engines": { 511 | "node": ">=10" 512 | } 513 | }, 514 | "node_modules/process-nextick-args": { 515 | "version": "2.0.1", 516 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 517 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 518 | }, 519 | "node_modules/pump": { 520 | "version": "3.0.0", 521 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 522 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 523 | "dependencies": { 524 | "end-of-stream": "^1.1.0", 525 | "once": "^1.3.1" 526 | } 527 | }, 528 | "node_modules/rc": { 529 | "version": "1.2.8", 530 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 531 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 532 | "dependencies": { 533 | "deep-extend": "^0.6.0", 534 | "ini": "~1.3.0", 535 | "minimist": "^1.2.0", 536 | "strip-json-comments": "~2.0.1" 537 | }, 538 | "bin": { 539 | "rc": "cli.js" 540 | } 541 | }, 542 | "node_modules/readable-stream": { 543 | "version": "2.3.7", 544 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 545 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 546 | "dependencies": { 547 | "core-util-is": "~1.0.0", 548 | "inherits": "~2.0.3", 549 | "isarray": "~1.0.0", 550 | "process-nextick-args": "~2.0.0", 551 | "safe-buffer": "~5.1.1", 552 | "string_decoder": "~1.1.1", 553 | "util-deprecate": "~1.0.1" 554 | } 555 | }, 556 | "node_modules/safe-buffer": { 557 | "version": "5.1.2", 558 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 559 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 560 | }, 561 | "node_modules/semver": { 562 | "version": "7.5.4", 563 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", 564 | "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", 565 | "dependencies": { 566 | "lru-cache": "^6.0.0" 567 | }, 568 | "bin": { 569 | "semver": "bin/semver.js" 570 | }, 571 | "engines": { 572 | "node": ">=10" 573 | } 574 | }, 575 | "node_modules/serialport": { 576 | "version": "9.0.0", 577 | "resolved": "https://registry.npmjs.org/serialport/-/serialport-9.0.0.tgz", 578 | "integrity": "sha512-4kQqIM0XhT6QECyzJtPdSsDWRFt8u3/vscQxb+z4TrAMiPDkDGBTLDaXmCxarXDa1s7EeK1IyxMce9wzWPFzAQ==", 579 | "hasInstallScript": true, 580 | "dependencies": { 581 | "@serialport/binding-mock": "^9.0.0", 582 | "@serialport/bindings": "^9.0.0", 583 | "@serialport/parser-byte-length": "^9.0.0", 584 | "@serialport/parser-cctalk": "^9.0.0", 585 | "@serialport/parser-delimiter": "^9.0.0", 586 | "@serialport/parser-readline": "^9.0.0", 587 | "@serialport/parser-ready": "^9.0.0", 588 | "@serialport/parser-regex": "^9.0.0", 589 | "@serialport/stream": "^9.0.0", 590 | "debug": "^4.1.1" 591 | }, 592 | "engines": { 593 | "node": ">=8.6.0" 594 | } 595 | }, 596 | "node_modules/set-blocking": { 597 | "version": "2.0.0", 598 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 599 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" 600 | }, 601 | "node_modules/signal-exit": { 602 | "version": "3.0.6", 603 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", 604 | "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==" 605 | }, 606 | "node_modules/simple-concat": { 607 | "version": "1.0.1", 608 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", 609 | "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", 610 | "funding": [ 611 | { 612 | "type": "github", 613 | "url": "https://github.com/sponsors/feross" 614 | }, 615 | { 616 | "type": "patreon", 617 | "url": "https://www.patreon.com/feross" 618 | }, 619 | { 620 | "type": "consulting", 621 | "url": "https://feross.org/support" 622 | } 623 | ] 624 | }, 625 | "node_modules/simple-get": { 626 | "version": "4.0.1", 627 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", 628 | "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", 629 | "funding": [ 630 | { 631 | "type": "github", 632 | "url": "https://github.com/sponsors/feross" 633 | }, 634 | { 635 | "type": "patreon", 636 | "url": "https://www.patreon.com/feross" 637 | }, 638 | { 639 | "type": "consulting", 640 | "url": "https://feross.org/support" 641 | } 642 | ], 643 | "dependencies": { 644 | "decompress-response": "^6.0.0", 645 | "once": "^1.3.1", 646 | "simple-concat": "^1.0.0" 647 | } 648 | }, 649 | "node_modules/string_decoder": { 650 | "version": "1.1.1", 651 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 652 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 653 | "dependencies": { 654 | "safe-buffer": "~5.1.0" 655 | } 656 | }, 657 | "node_modules/string-width": { 658 | "version": "1.0.2", 659 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 660 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 661 | "dependencies": { 662 | "code-point-at": "^1.0.0", 663 | "is-fullwidth-code-point": "^1.0.0", 664 | "strip-ansi": "^3.0.0" 665 | }, 666 | "engines": { 667 | "node": ">=0.10.0" 668 | } 669 | }, 670 | "node_modules/strip-ansi": { 671 | "version": "3.0.1", 672 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 673 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 674 | "dependencies": { 675 | "ansi-regex": "^2.0.0" 676 | }, 677 | "engines": { 678 | "node": ">=0.10.0" 679 | } 680 | }, 681 | "node_modules/strip-json-comments": { 682 | "version": "2.0.1", 683 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 684 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", 685 | "engines": { 686 | "node": ">=0.10.0" 687 | } 688 | }, 689 | "node_modules/tar-fs": { 690 | "version": "2.1.3", 691 | "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", 692 | "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==", 693 | "license": "MIT", 694 | "dependencies": { 695 | "chownr": "^1.1.1", 696 | "mkdirp-classic": "^0.5.2", 697 | "pump": "^3.0.0", 698 | "tar-stream": "^2.1.4" 699 | } 700 | }, 701 | "node_modules/tar-stream": { 702 | "version": "2.2.0", 703 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", 704 | "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", 705 | "dependencies": { 706 | "bl": "^4.0.3", 707 | "end-of-stream": "^1.4.1", 708 | "fs-constants": "^1.0.0", 709 | "inherits": "^2.0.3", 710 | "readable-stream": "^3.1.1" 711 | }, 712 | "engines": { 713 | "node": ">=6" 714 | } 715 | }, 716 | "node_modules/tar-stream/node_modules/readable-stream": { 717 | "version": "3.6.0", 718 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 719 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 720 | "dependencies": { 721 | "inherits": "^2.0.3", 722 | "string_decoder": "^1.1.1", 723 | "util-deprecate": "^1.0.1" 724 | }, 725 | "engines": { 726 | "node": ">= 6" 727 | } 728 | }, 729 | "node_modules/tunnel-agent": { 730 | "version": "0.6.0", 731 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 732 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 733 | "dependencies": { 734 | "safe-buffer": "^5.0.1" 735 | }, 736 | "engines": { 737 | "node": "*" 738 | } 739 | }, 740 | "node_modules/util-deprecate": { 741 | "version": "1.0.2", 742 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 743 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 744 | }, 745 | "node_modules/wide-align": { 746 | "version": "1.1.5", 747 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", 748 | "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", 749 | "dependencies": { 750 | "string-width": "^1.0.2 || 2 || 3 || 4" 751 | } 752 | }, 753 | "node_modules/wrappy": { 754 | "version": "1.0.2", 755 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 756 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 757 | }, 758 | "node_modules/ws": { 759 | "version": "7.5.10", 760 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", 761 | "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", 762 | "engines": { 763 | "node": ">=8.3.0" 764 | }, 765 | "peerDependencies": { 766 | "bufferutil": "^4.0.1", 767 | "utf-8-validate": "^5.0.2" 768 | }, 769 | "peerDependenciesMeta": { 770 | "bufferutil": { 771 | "optional": true 772 | }, 773 | "utf-8-validate": { 774 | "optional": true 775 | } 776 | } 777 | }, 778 | "node_modules/yallist": { 779 | "version": "4.0.0", 780 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 781 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 782 | } 783 | }, 784 | "dependencies": { 785 | "@serialport/binding-abstract": { 786 | "version": "9.2.3", 787 | "resolved": "https://registry.npmjs.org/@serialport/binding-abstract/-/binding-abstract-9.2.3.tgz", 788 | "integrity": "sha512-cQs9tbIlG3P0IrOWyVirqlhWuJ7Ms2Zh9m2108z6Y5UW/iVj6wEOiW8EmK9QX9jmJXYllE7wgGgvVozP5oCj3w==", 789 | "requires": { 790 | "debug": "^4.3.2" 791 | } 792 | }, 793 | "@serialport/binding-mock": { 794 | "version": "9.0.0", 795 | "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-9.0.0.tgz", 796 | "integrity": "sha512-E65ZbykGwZSoHpQvjuJkTbwEM0uZku+SROtO+VMs/mShMalBnOSoRDU2IedkFKvz6IqowZZOVyaBUbnKYoAUuQ==", 797 | "requires": { 798 | "@serialport/binding-abstract": "^9.0.0", 799 | "debug": "^4.1.1" 800 | } 801 | }, 802 | "@serialport/bindings": { 803 | "version": "9.2.8", 804 | "resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-9.2.8.tgz", 805 | "integrity": "sha512-hSLxTe0tADZ3LMMGwvEJWOC/TaFQTyPeFalUCsJ1lSQ0k6bPF04JwrtB/C81GetmDBTNRY0GlD0SNtKCc7Dr5g==", 806 | "requires": { 807 | "@serialport/binding-abstract": "9.2.3", 808 | "@serialport/parser-readline": "9.2.4", 809 | "bindings": "^1.5.0", 810 | "debug": "^4.3.2", 811 | "nan": "^2.15.0", 812 | "prebuild-install": "^7.0.0" 813 | } 814 | }, 815 | "@serialport/parser-byte-length": { 816 | "version": "9.0.0", 817 | "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-9.0.0.tgz", 818 | "integrity": "sha512-MaXWTqxz9SeWaN488uFhDMA3cy2sQFoGHDQqDpy6q9wBGlPBe+UpRAznzOoNPkAehqyPo1Vc7gxYsBfgjZtWaw==" 819 | }, 820 | "@serialport/parser-cctalk": { 821 | "version": "9.0.0", 822 | "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-9.0.0.tgz", 823 | "integrity": "sha512-tFJRF+uceEMYQeOLi92CYr1SScnI+2QLkawNHaVwwcmLV0ezwmsm1hvwBCWHkWDsY6U1SiElNJ5HpF89kS28zQ==" 824 | }, 825 | "@serialport/parser-delimiter": { 826 | "version": "9.2.4", 827 | "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-9.2.4.tgz", 828 | "integrity": "sha512-4nvTAoYAgkxFiXrkI+3CA49Yd43CODjeszh89EK+I9c8wOZ+etZduRCzINYPiy26g7zO+GRAb9FoPCsY+sYcbQ==" 829 | }, 830 | "@serialport/parser-readline": { 831 | "version": "9.2.4", 832 | "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-9.2.4.tgz", 833 | "integrity": "sha512-Z1/qrZTQUVhNSJP1hd9YfDvq0o7d87rNwAjjRKbVpa7Qi51tG5BnKt43IV3NFMyBlVcRe0rnIb3tJu57E0SOwg==", 834 | "requires": { 835 | "@serialport/parser-delimiter": "9.2.4" 836 | } 837 | }, 838 | "@serialport/parser-ready": { 839 | "version": "9.0.0", 840 | "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-9.0.0.tgz", 841 | "integrity": "sha512-oSQR7773Jdc6SjXMA1mWgfFlyBLcIRlZtt1BJMfO07k3ynBmanJ4VysVDTDvxtsREHLgcjoLRKQC/6wl2wvXOQ==" 842 | }, 843 | "@serialport/parser-regex": { 844 | "version": "9.0.0", 845 | "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-9.0.0.tgz", 846 | "integrity": "sha512-Q4LDXbWnun5r1ML6ZLS5Wb2BurnkJjtP1geHtZbshLUmpfms++Q28li8OPzv/KQ6praC1HDRG37D0AY6xoObSw==" 847 | }, 848 | "@serialport/stream": { 849 | "version": "9.0.0", 850 | "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-9.0.0.tgz", 851 | "integrity": "sha512-JK952xKP+7PX3tXj9DgKafQaAru0sdbkTIY1OpjUNGp0xYWTVUbZRnLK//MLkH6FpoDTJc9ghN2ILK0YRtpLLA==", 852 | "requires": { 853 | "debug": "^4.1.1" 854 | } 855 | }, 856 | "ansi-regex": { 857 | "version": "2.1.1", 858 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 859 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 860 | }, 861 | "aproba": { 862 | "version": "1.2.0", 863 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", 864 | "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" 865 | }, 866 | "are-we-there-yet": { 867 | "version": "1.1.7", 868 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", 869 | "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", 870 | "requires": { 871 | "delegates": "^1.0.0", 872 | "readable-stream": "^2.0.6" 873 | } 874 | }, 875 | "base64-js": { 876 | "version": "1.5.1", 877 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 878 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 879 | }, 880 | "bindings": { 881 | "version": "1.5.0", 882 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 883 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 884 | "requires": { 885 | "file-uri-to-path": "1.0.0" 886 | } 887 | }, 888 | "bl": { 889 | "version": "4.1.0", 890 | "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", 891 | "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", 892 | "requires": { 893 | "buffer": "^5.5.0", 894 | "inherits": "^2.0.4", 895 | "readable-stream": "^3.4.0" 896 | }, 897 | "dependencies": { 898 | "readable-stream": { 899 | "version": "3.6.0", 900 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 901 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 902 | "requires": { 903 | "inherits": "^2.0.3", 904 | "string_decoder": "^1.1.1", 905 | "util-deprecate": "^1.0.1" 906 | } 907 | } 908 | } 909 | }, 910 | "buffer": { 911 | "version": "5.7.1", 912 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 913 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 914 | "requires": { 915 | "base64-js": "^1.3.1", 916 | "ieee754": "^1.1.13" 917 | } 918 | }, 919 | "chownr": { 920 | "version": "1.1.4", 921 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 922 | "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" 923 | }, 924 | "code-point-at": { 925 | "version": "1.1.0", 926 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 927 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" 928 | }, 929 | "console-control-strings": { 930 | "version": "1.1.0", 931 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 932 | "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" 933 | }, 934 | "core-util-is": { 935 | "version": "1.0.3", 936 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 937 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" 938 | }, 939 | "debug": { 940 | "version": "4.3.3", 941 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", 942 | "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", 943 | "requires": { 944 | "ms": "2.1.2" 945 | } 946 | }, 947 | "decompress-response": { 948 | "version": "6.0.0", 949 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", 950 | "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", 951 | "requires": { 952 | "mimic-response": "^3.1.0" 953 | } 954 | }, 955 | "deep-extend": { 956 | "version": "0.6.0", 957 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 958 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" 959 | }, 960 | "delegates": { 961 | "version": "1.0.0", 962 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 963 | "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" 964 | }, 965 | "detect-libc": { 966 | "version": "2.0.0", 967 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.0.tgz", 968 | "integrity": "sha512-S55LzUl8HUav8l9E2PBTlC5PAJrHK7tkM+XXFGD+fbsbkTzhCpG6K05LxJcUOEWzMa4v6ptcMZ9s3fOdJDu0Zw==" 969 | }, 970 | "end-of-stream": { 971 | "version": "1.4.4", 972 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 973 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 974 | "requires": { 975 | "once": "^1.4.0" 976 | } 977 | }, 978 | "expand-template": { 979 | "version": "2.0.3", 980 | "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", 981 | "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" 982 | }, 983 | "file-uri-to-path": { 984 | "version": "1.0.0", 985 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 986 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 987 | }, 988 | "fs-constants": { 989 | "version": "1.0.0", 990 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 991 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" 992 | }, 993 | "gauge": { 994 | "version": "2.7.4", 995 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", 996 | "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", 997 | "requires": { 998 | "aproba": "^1.0.3", 999 | "console-control-strings": "^1.0.0", 1000 | "has-unicode": "^2.0.0", 1001 | "object-assign": "^4.1.0", 1002 | "signal-exit": "^3.0.0", 1003 | "string-width": "^1.0.1", 1004 | "strip-ansi": "^3.0.1", 1005 | "wide-align": "^1.1.0" 1006 | } 1007 | }, 1008 | "github-from-package": { 1009 | "version": "0.0.0", 1010 | "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", 1011 | "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" 1012 | }, 1013 | "has-unicode": { 1014 | "version": "2.0.1", 1015 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 1016 | "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" 1017 | }, 1018 | "ieee754": { 1019 | "version": "1.2.1", 1020 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 1021 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" 1022 | }, 1023 | "inherits": { 1024 | "version": "2.0.4", 1025 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1026 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 1027 | }, 1028 | "ini": { 1029 | "version": "1.3.8", 1030 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", 1031 | "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" 1032 | }, 1033 | "is-fullwidth-code-point": { 1034 | "version": "1.0.0", 1035 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 1036 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 1037 | "requires": { 1038 | "number-is-nan": "^1.0.0" 1039 | } 1040 | }, 1041 | "isarray": { 1042 | "version": "1.0.0", 1043 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 1044 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 1045 | }, 1046 | "lru-cache": { 1047 | "version": "6.0.0", 1048 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 1049 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 1050 | "requires": { 1051 | "yallist": "^4.0.0" 1052 | } 1053 | }, 1054 | "mimic-response": { 1055 | "version": "3.1.0", 1056 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", 1057 | "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" 1058 | }, 1059 | "minimist": { 1060 | "version": "1.2.6", 1061 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", 1062 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" 1063 | }, 1064 | "mkdirp-classic": { 1065 | "version": "0.5.3", 1066 | "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", 1067 | "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" 1068 | }, 1069 | "ms": { 1070 | "version": "2.1.2", 1071 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1072 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 1073 | }, 1074 | "nan": { 1075 | "version": "2.15.0", 1076 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", 1077 | "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" 1078 | }, 1079 | "napi-build-utils": { 1080 | "version": "1.0.2", 1081 | "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", 1082 | "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" 1083 | }, 1084 | "node-abi": { 1085 | "version": "3.5.0", 1086 | "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.5.0.tgz", 1087 | "integrity": "sha512-LtHvNIBgOy5mO8mPEUtkCW/YCRWYEKshIvqhe1GHHyXEHEB5mgICyYnAcl4qan3uFeRROErKGzatFHPf6kDxWw==", 1088 | "requires": { 1089 | "semver": "^7.3.5" 1090 | } 1091 | }, 1092 | "npmlog": { 1093 | "version": "4.1.2", 1094 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", 1095 | "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", 1096 | "requires": { 1097 | "are-we-there-yet": "~1.1.2", 1098 | "console-control-strings": "~1.1.0", 1099 | "gauge": "~2.7.3", 1100 | "set-blocking": "~2.0.0" 1101 | } 1102 | }, 1103 | "number-is-nan": { 1104 | "version": "1.0.1", 1105 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 1106 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" 1107 | }, 1108 | "object-assign": { 1109 | "version": "4.1.1", 1110 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1111 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 1112 | }, 1113 | "once": { 1114 | "version": "1.4.0", 1115 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1116 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1117 | "requires": { 1118 | "wrappy": "1" 1119 | } 1120 | }, 1121 | "prebuild-install": { 1122 | "version": "7.0.1", 1123 | "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.0.1.tgz", 1124 | "integrity": "sha512-QBSab31WqkyxpnMWQxubYAHR5S9B2+r81ucocew34Fkl98FhvKIF50jIJnNOBmAZfyNV7vE5T6gd3hTVWgY6tg==", 1125 | "requires": { 1126 | "detect-libc": "^2.0.0", 1127 | "expand-template": "^2.0.3", 1128 | "github-from-package": "0.0.0", 1129 | "minimist": "^1.2.3", 1130 | "mkdirp-classic": "^0.5.3", 1131 | "napi-build-utils": "^1.0.1", 1132 | "node-abi": "^3.3.0", 1133 | "npmlog": "^4.0.1", 1134 | "pump": "^3.0.0", 1135 | "rc": "^1.2.7", 1136 | "simple-get": "^4.0.0", 1137 | "tar-fs": "^2.0.0", 1138 | "tunnel-agent": "^0.6.0" 1139 | } 1140 | }, 1141 | "process-nextick-args": { 1142 | "version": "2.0.1", 1143 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 1144 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 1145 | }, 1146 | "pump": { 1147 | "version": "3.0.0", 1148 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 1149 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 1150 | "requires": { 1151 | "end-of-stream": "^1.1.0", 1152 | "once": "^1.3.1" 1153 | } 1154 | }, 1155 | "rc": { 1156 | "version": "1.2.8", 1157 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 1158 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 1159 | "requires": { 1160 | "deep-extend": "^0.6.0", 1161 | "ini": "~1.3.0", 1162 | "minimist": "^1.2.0", 1163 | "strip-json-comments": "~2.0.1" 1164 | } 1165 | }, 1166 | "readable-stream": { 1167 | "version": "2.3.7", 1168 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 1169 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 1170 | "requires": { 1171 | "core-util-is": "~1.0.0", 1172 | "inherits": "~2.0.3", 1173 | "isarray": "~1.0.0", 1174 | "process-nextick-args": "~2.0.0", 1175 | "safe-buffer": "~5.1.1", 1176 | "string_decoder": "~1.1.1", 1177 | "util-deprecate": "~1.0.1" 1178 | } 1179 | }, 1180 | "safe-buffer": { 1181 | "version": "5.1.2", 1182 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1183 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1184 | }, 1185 | "semver": { 1186 | "version": "7.5.4", 1187 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", 1188 | "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", 1189 | "requires": { 1190 | "lru-cache": "^6.0.0" 1191 | } 1192 | }, 1193 | "serialport": { 1194 | "version": "9.0.0", 1195 | "resolved": "https://registry.npmjs.org/serialport/-/serialport-9.0.0.tgz", 1196 | "integrity": "sha512-4kQqIM0XhT6QECyzJtPdSsDWRFt8u3/vscQxb+z4TrAMiPDkDGBTLDaXmCxarXDa1s7EeK1IyxMce9wzWPFzAQ==", 1197 | "requires": { 1198 | "@serialport/binding-mock": "^9.0.0", 1199 | "@serialport/bindings": "^9.0.0", 1200 | "@serialport/parser-byte-length": "^9.0.0", 1201 | "@serialport/parser-cctalk": "^9.0.0", 1202 | "@serialport/parser-delimiter": "^9.0.0", 1203 | "@serialport/parser-readline": "^9.0.0", 1204 | "@serialport/parser-ready": "^9.0.0", 1205 | "@serialport/parser-regex": "^9.0.0", 1206 | "@serialport/stream": "^9.0.0", 1207 | "debug": "^4.1.1" 1208 | } 1209 | }, 1210 | "set-blocking": { 1211 | "version": "2.0.0", 1212 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 1213 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" 1214 | }, 1215 | "signal-exit": { 1216 | "version": "3.0.6", 1217 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", 1218 | "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==" 1219 | }, 1220 | "simple-concat": { 1221 | "version": "1.0.1", 1222 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", 1223 | "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" 1224 | }, 1225 | "simple-get": { 1226 | "version": "4.0.1", 1227 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", 1228 | "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", 1229 | "requires": { 1230 | "decompress-response": "^6.0.0", 1231 | "once": "^1.3.1", 1232 | "simple-concat": "^1.0.0" 1233 | } 1234 | }, 1235 | "string_decoder": { 1236 | "version": "1.1.1", 1237 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1238 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1239 | "requires": { 1240 | "safe-buffer": "~5.1.0" 1241 | } 1242 | }, 1243 | "string-width": { 1244 | "version": "1.0.2", 1245 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 1246 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 1247 | "requires": { 1248 | "code-point-at": "^1.0.0", 1249 | "is-fullwidth-code-point": "^1.0.0", 1250 | "strip-ansi": "^3.0.0" 1251 | } 1252 | }, 1253 | "strip-ansi": { 1254 | "version": "3.0.1", 1255 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 1256 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 1257 | "requires": { 1258 | "ansi-regex": "^2.0.0" 1259 | } 1260 | }, 1261 | "strip-json-comments": { 1262 | "version": "2.0.1", 1263 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1264 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" 1265 | }, 1266 | "tar-fs": { 1267 | "version": "2.1.3", 1268 | "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", 1269 | "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==", 1270 | "requires": { 1271 | "chownr": "^1.1.1", 1272 | "mkdirp-classic": "^0.5.2", 1273 | "pump": "^3.0.0", 1274 | "tar-stream": "^2.1.4" 1275 | } 1276 | }, 1277 | "tar-stream": { 1278 | "version": "2.2.0", 1279 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", 1280 | "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", 1281 | "requires": { 1282 | "bl": "^4.0.3", 1283 | "end-of-stream": "^1.4.1", 1284 | "fs-constants": "^1.0.0", 1285 | "inherits": "^2.0.3", 1286 | "readable-stream": "^3.1.1" 1287 | }, 1288 | "dependencies": { 1289 | "readable-stream": { 1290 | "version": "3.6.0", 1291 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 1292 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 1293 | "requires": { 1294 | "inherits": "^2.0.3", 1295 | "string_decoder": "^1.1.1", 1296 | "util-deprecate": "^1.0.1" 1297 | } 1298 | } 1299 | } 1300 | }, 1301 | "tunnel-agent": { 1302 | "version": "0.6.0", 1303 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1304 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 1305 | "requires": { 1306 | "safe-buffer": "^5.0.1" 1307 | } 1308 | }, 1309 | "util-deprecate": { 1310 | "version": "1.0.2", 1311 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1312 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1313 | }, 1314 | "wide-align": { 1315 | "version": "1.1.5", 1316 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", 1317 | "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", 1318 | "requires": { 1319 | "string-width": "^1.0.2 || 2 || 3 || 4" 1320 | } 1321 | }, 1322 | "wrappy": { 1323 | "version": "1.0.2", 1324 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1325 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1326 | }, 1327 | "ws": { 1328 | "version": "7.5.10", 1329 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", 1330 | "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", 1331 | "requires": {} 1332 | }, 1333 | "yallist": { 1334 | "version": "4.0.0", 1335 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1336 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 1337 | } 1338 | } 1339 | } 1340 | -------------------------------------------------------------------------------- /CastCanvas/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flipdots", 3 | "version": "1.0.0", 4 | "description": "A NodeJS script to control one or more FlipDot displays.", 5 | "author": "Owen McAteer", 6 | "main": "FlipDots.js", 7 | "dependencies": { 8 | "serialport": "^9.0.0", 9 | "ws": "^7.5.10" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git@github.com:owenmcateer/FlipDots.git" 14 | }, 15 | "keywords": [ 16 | "FlipDots", 17 | "Flip discs", 18 | "Flip Dot display", 19 | "display controller" 20 | ], 21 | "license": "gpl-3.0", 22 | "bugs": { 23 | "url": "https://github.com/owenmcateer/FlipDots/issues" 24 | }, 25 | "homepage": "https://github.com/owenmcateer/FlipDots#readme" 26 | } 27 | -------------------------------------------------------------------------------- /FlipDot/FlipDot.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * FlipDot Controller 3 | * 4 | * This Processing sketch is to control FlipDot panels from AlfaZeta. 5 | * It uses a virtual display you can draw and animate on that then gets cast to your FlipDot display panels. 6 | * 7 | * If you don't have a FlipDot display you can still use this software as a FlipDot simulator. Just set `config_cast = false` 8 | * 9 | * @author Owen McAteer 10 | * @url https://github.com/owenmcateer/FlipDots 11 | * @socials https://x.com/motus_art 12 | * @socials https://instagram.com/motus_art 13 | * 14 | * Required libraries 15 | * - processing.net | Processing foundation 16 | * - processing.serial | Processing foundation 17 | * - websockets | Lasse Steenbock Vestergaard | (Only for realtime Crypo feed example) 18 | */ 19 | ClusterGrowth cluster_growth; 20 | 21 | void setup() { 22 | size(1080, 720, P2D); 23 | frameRate(config_fps); 24 | colorMode(RGB, 255, 255, 255, 1); 25 | 26 | // Core setup functions 27 | cast_setup(); 28 | config_setup(); 29 | stages_setup(); 30 | ui_setup(); 31 | 32 | // Scene setup 33 | cluster_growth = new ClusterGrowth(); 34 | } 35 | 36 | 37 | /** 38 | * Draw tick 39 | */ 40 | void draw() { 41 | background(59); 42 | 43 | // 3D test 44 | virtual3D.beginDraw(); 45 | virtual3D.background(0); 46 | virtual3D.translate(virtual3D.width / 2, virtual3D.height / 2); 47 | virtual3D.rotateX(frameCount / 20.0); 48 | virtual3D.rotateY(frameCount / 20.0); 49 | virtual3D.stroke(255); 50 | virtual3D.strokeWeight(2); 51 | virtual3D.noFill(); 52 | virtual3D.box(14); 53 | virtual3D.endDraw(); 54 | // End 3D test 55 | 56 | // Between beginDraw/endDraw you can draw whatever you want to virtualDisplay(PGraphics) 57 | virtualDisplay.beginDraw(); 58 | virtualDisplay.background(0); 59 | 60 | // Examples 61 | //example_blips(); // Blips animation 62 | example_anim(); // Animations 63 | //cluster_growth.draw(); // Cluster growth 64 | 65 | // Games 66 | //games_tetris(); 67 | 68 | // End drawing 69 | virtualDisplay.endDraw(); 70 | 71 | // Preview frame render 72 | ui_render(); 73 | 74 | // Process frame 75 | stage_process(); 76 | 77 | // Cast to display 78 | cast_broadcast(); 79 | } 80 | -------------------------------------------------------------------------------- /FlipDot/Panel.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Panel class 3 | * 4 | * This class holds the panels and processed their data to be cast. 5 | * 6 | * @param {int} adapterId | Ref to adapter index ID in {netAdapters/serialAdapters} 7 | * @param {int} panelNum | Panel ID (set on the 3-pin DIP switch) 8 | * @param {int} offsetX | X-position in total display 9 | * @param {int} offsetY | Y-position in total display 10 | */ 11 | class Panel { 12 | int adapter; 13 | int id; 14 | String aps; 15 | int x; 16 | int y; 17 | byte[] buffer = new byte[28]; 18 | boolean has_changed = true; 19 | 20 | // Create new panel 21 | Panel(int adapterId, int panelNum, int offsetX, int offsetY) { 22 | adapter = adapterId; 23 | id = panelNum; 24 | x = offsetX; 25 | y = offsetY; 26 | for (int i = 0; i < 28; i++) { 27 | buffer[i] = byte(0); 28 | } 29 | } 30 | 31 | // Process this panels frame data 32 | void process() { 33 | int offset = y * config_canvasW + x; 34 | has_changed = false; 35 | 36 | // Loop columns in panel 37 | for (int col = 0; col < 28; col++) { 38 | byte b = (byte)0x00; 39 | int index = offset + col; 40 | 41 | // Process each panel column 42 | for (int panel_row = 0; panel_row < 7; panel_row++) { 43 | int pixelLocationY = index + (panel_row * config_canvasW); 44 | if (brightness(virtualDisplay.pixels[pixelLocationY]) > 0.5) { 45 | b |= 1 << panel_row; 46 | } 47 | } 48 | 49 | // Has something changed? 50 | if (b != buffer[col]) { 51 | has_changed = true; 52 | } 53 | buffer[col] = b; 54 | } 55 | } 56 | 57 | // Return X 58 | int x() { 59 | return this.x; 60 | } 61 | 62 | // Return Y 63 | int y() { 64 | return this.y; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /FlipDot/cast.pde: -------------------------------------------------------------------------------- 1 | import processing.net.*; 2 | import processing.serial.*; 3 | 4 | /** 5 | * Setup casting 6 | * 7 | * If casting is enabled, connected to the ETH-Serial converters. 8 | * Uncomment `printArray(Serial.list());` to list USB devices. 9 | */ 10 | void cast_setup() { 11 | // Cast data 12 | if (!config_cast) return; 13 | 14 | // Cast over Network 15 | if (castOver == 1) { 16 | // Connect to each network adapter 17 | for (int i = 0; i < netAdapters.length; i++) { 18 | String[] adapterAddress = split(netAdapters[i], ':'); 19 | adaptersNet[i] = new Client(this, adapterAddress[0], int(adapterAddress[1])); 20 | } 21 | } 22 | // Cast over USB Serial device 23 | else if (castOver == 2) { 24 | // Uncomment List all the available serial ports: 25 | // printArray(Serial.list()); 26 | 27 | // Connect to each USB serial device 28 | for (int i = 0; i < serialAdapters.length; i++) { 29 | String[] adapterAddress = split(serialAdapters[i], ':'); 30 | adaptersSerial[i] = new Serial(this, adapterAddress[0], int(adapterAddress[1])); 31 | } 32 | } 33 | } 34 | 35 | 36 | /** 37 | * Cast data to display 38 | */ 39 | void cast_broadcast() { 40 | // Only if casting is enabled. 41 | if (!config_cast) return; 42 | 43 | // Push data to all adapters 44 | int adapterCount = netAdapters.length; 45 | if (castOver == 2) { 46 | adapterCount = serialAdapters.length; 47 | } 48 | 49 | for (int adapter = 0; adapter < adapterCount; adapter++) { 50 | // Each panel connected to adapter 51 | for (int i = 0; i < panels.length; i++) { 52 | // Is this panel connected to this adapter 53 | if (panels[i].adapter != adapter) continue; 54 | 55 | // If enabled and panel image has not changed, skip 56 | if (config_cast_only_changed && panels[i].has_changed == false) continue; 57 | 58 | // Send frame data 59 | cast_write(adapter, 0x80); 60 | cast_write(adapter, (config_video_sync) ? 0x84 : 0x83); 61 | cast_write(adapter, panels[i].id); 62 | cast_write(adapter, panels[i].buffer); 63 | cast_write(adapter, 0x8F); 64 | } 65 | } 66 | 67 | // Video sync update 68 | // This instruction tells all panels to refresh 69 | if (config_video_sync) { 70 | for (int adapter = 0; adapter < adapterCount; adapter++) { 71 | // Refresh all panels command 72 | cast_write(adapter, 0x80); 73 | cast_write(adapter, 0x82); 74 | cast_write(adapter, 0x8F); 75 | } 76 | } 77 | } 78 | 79 | 80 | /** 81 | * Cast write 82 | * 83 | * Push data out over adapter. 84 | * 85 | * @param {int} adapter | Adapter ID {netAdapters/serialAdapters} 86 | * @param {int/byte/byte[]} data | Frame data 87 | * @return {void} 88 | */ 89 | void cast_write(int adapter, int data) { 90 | if (castOver == 1) { 91 | // Network adapter 92 | adaptersNet[adapter].write(data); 93 | } 94 | else if(castOver == 2) { 95 | // USB Serial device 96 | adaptersSerial[adapter].write(data); 97 | } 98 | } 99 | void cast_write(int adapter, byte data) { 100 | cast_write(adapter, data); 101 | } 102 | void cast_write(int adapter, byte[] data) { 103 | if (castOver == 1) { 104 | // Network adapter 105 | adaptersNet[adapter].write(data); 106 | } 107 | else if(castOver == 2) { 108 | // USB Serial device 109 | adaptersSerial[adapter].write(data); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /FlipDot/config.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Config 3 | * 4 | * There are a few settings here you need to set here. 5 | * 6 | * Boolean `config_cast` 7 | * true = Cast data to display 8 | * false = Run as a simulator 9 | * 10 | * Int `castOver` 11 | * 1 = ETH network 12 | * 2 = USB serial 13 | * 14 | * RS485 converter devices 15 | * Use their a ETH or USB serial device 16 | * ETH use {netAdapters} 17 | * IP address:port 18 | * USB use {serialAdapters} 19 | * COM port:baud rate 20 | * 21 | * Int `config_fps` 22 | * Change if you want, I have found 30 fps work best for most displays. 23 | * 24 | * Bollean `config_video_sync` 25 | * This setting tells the panels to wait until all data has been transmitted before refreshing. Good for syncing large displays 26 | * 27 | * Panel[] panels = new Panel[4]; 28 | * Set thei array size to the number of panels you have in your display. 29 | * 30 | * createPanels() 31 | * Create a new panel for each one you have in your display 32 | * `panels[0] = new Panel(0, 1, 0, 0);` 33 | * 1) Adapter ID (see net/serialAdapters) 34 | * 2) Panel ID (set on the 3-pin DIP switch) 35 | * 3) X-position in total display 36 | * 4) Y-position in total display 37 | * 38 | * Boolean config_show_simulator 39 | * Show/Hide the UI simulator. 40 | * 41 | * Boolean config_cast_only_changed 42 | * Enable this setting to only cast panel data if its image has changed. 43 | * This will save network bandwidth and is ideal for slow networks and/or large displays. 44 | * But keep in mind each frame will cast a different amount of data, which could lead to varying frame rates. 45 | * 46 | * Boolean config_simulate_changes 47 | * Enable if you wish to see the changed panels in the simulator. 48 | */ 49 | boolean config_cast = false; 50 | int config_fps = 30; 51 | int config_canvasW; 52 | int config_canvasH; 53 | boolean config_video_sync = true; 54 | boolean config_show_simulator = true; 55 | boolean config_cast_only_changed = false; 56 | boolean config_simulate_changes = false; 57 | 58 | // Network settings 59 | // 1 = ETH network 60 | // 2 = USB serial 61 | int castOver = 1; 62 | 63 | // Panels 64 | Panel[] panels = new Panel[4]; 65 | 66 | // Network device 67 | // IP address:port 68 | String[] netAdapters = { 69 | "192.168.1.15:5000", 70 | "192.168.1.15:5001", 71 | "192.168.1.15:5002", 72 | "192.168.1.15:5003" 73 | }; 74 | 75 | // USB device 76 | // COM port:baud rate 77 | String[] serialAdapters = { 78 | "COM13:57600" 79 | }; 80 | 81 | // Create adapters 82 | Client[] adaptersNet = new Client[netAdapters.length]; 83 | Serial[] adaptersSerial = new Serial[serialAdapters.length]; 84 | 85 | // Assets 86 | PFont FlipDotFont; 87 | PFont FlipDotFont_pixel; 88 | 89 | // UI 90 | int border = 40; 91 | 92 | /** 93 | * Config setup 94 | */ 95 | void config_setup() { 96 | // Load assets 97 | 98 | // Fonts 99 | FlipDotFont = createFont("fonts/zxSpectrumStrictCondensed.ttf", 15); // Good all round small font 100 | //FlipDotFont = createFont("fonts/PressStart2P.ttf", 8); // Stylish but large 101 | //FlipDotFont = createFont("fonts/PixeloidMono.ttf", 8); // Big and clear font 102 | FlipDotFont_pixel = createFont("fonts/m3x6.ttf", 16); // Good general pixel font 103 | 104 | // Setup FlipDot panels 105 | createPanels(); 106 | } 107 | 108 | 109 | /** 110 | * Create FlipDot panels 111 | * 112 | * List all panels you have in your display. 113 | * `panels[0] = new Panel(0, 1, 0, 0);` 114 | * 1) Adapter ID (see net/serialAdapters) 115 | * 2) Panel ID (set on the 3-pin DIP switch) 116 | * 3) X-position in total display 117 | * 4) Y-position in total display 118 | * 119 | * You can use the example layouts below or create your own. 120 | */ 121 | void createPanels() { 122 | /** 123 | * Single 28x14 panel 124 | * 125 | panels[1] = new Panel(0, 2, 0, 7); 126 | */ 127 | 128 | /** 129 | * Square display 130 | * Made up of 4 stacked panels 131 | */ 132 | panels[0] = new Panel(0, 1, 0, 0); 133 | panels[1] = new Panel(0, 2, 0, 7); 134 | panels[2] = new Panel(0, 3, 0, 14); 135 | panels[3] = new Panel(0, 4, 0, 21); 136 | 137 | /** 138 | * Large square 139 | * 2x8 panels 140 | * 141 | panels[0] = new Panel(0, 1, 0, 0); 142 | panels[1] = new Panel(0, 2, 0, 7); 143 | panels[2] = new Panel(0, 3, 0, 14); 144 | panels[3] = new Panel(0, 4, 0, 21); 145 | 146 | panels[4] = new Panel(1, 1, 28, 0); 147 | panels[5] = new Panel(1, 2, 28, 7); 148 | panels[6] = new Panel(1, 3, 28, 14); 149 | panels[7] = new Panel(1, 4, 28, 21); 150 | 151 | panels[8] = new Panel(2, 1, 0, 28); 152 | panels[9] = new Panel(2, 2, 0, 35); 153 | panels[10] = new Panel(2, 3, 0, 42); 154 | panels[11] = new Panel(2, 4, 0, 49); 155 | 156 | panels[12] = new Panel(3, 1, 28, 28); 157 | panels[13] = new Panel(3, 2, 28, 35); 158 | panels[14] = new Panel(3, 3, 28, 42); 159 | panels[15] = new Panel(3, 4, 28, 49); 160 | */ 161 | 162 | /** 163 | * Waterfall 164 | * 165 | panels[0] = new Panel(0, 1, 0, 0); 166 | panels[1] = new Panel(0, 2, 0, 7); 167 | panels[2] = new Panel(0, 3, 0, 14); 168 | panels[3] = new Panel(0, 4, 0, 21); 169 | 170 | panels[4] = new Panel(1, 1, 28, 28); 171 | panels[5] = new Panel(1, 2, 28, 35); 172 | panels[6] = new Panel(1, 3, 28, 42); 173 | panels[7] = new Panel(1, 4, 28, 49); 174 | 175 | panels[8] = new Panel(2, 1, 56, 56); 176 | panels[9] = new Panel(2, 2, 56, 63); 177 | panels[10] = new Panel(2, 3, 56, 70); 178 | panels[11] = new Panel(2, 4, 56, 77); 179 | 180 | panels[12] = new Panel(3, 1, 84, 84); 181 | panels[13] = new Panel(3, 2, 84, 91); 182 | panels[14] = new Panel(3, 3, 84, 98); 183 | panels[15] = new Panel(3, 4, 84, 105); 184 | */ 185 | 186 | /** 187 | * Superwide 188 | * 4x2 panels 189 | * 190 | panels[0] = new Panel(0, 1, 0, 0); 191 | panels[1] = new Panel(0, 2, 0, 7); 192 | panels[2] = new Panel(0, 3, 0, 14); 193 | panels[3] = new Panel(0, 4, 0, 21); 194 | 195 | panels[4] = new Panel(1, 1, 28, 0); 196 | panels[5] = new Panel(1, 2, 28, 7); 197 | panels[6] = new Panel(1, 3, 28, 14); 198 | panels[7] = new Panel(1, 4, 28, 21); 199 | 200 | panels[8] = new Panel(2, 1, 56, 0); 201 | panels[9] = new Panel(2, 2, 56, 7); 202 | panels[10] = new Panel(2, 3, 56, 14); 203 | panels[11] = new Panel(2, 4, 56, 21); 204 | 205 | panels[12] = new Panel(3, 1, 84, 0); 206 | panels[13] = new Panel(3, 2, 84, 7); 207 | panels[14] = new Panel(3, 3, 84, 14); 208 | panels[15] = new Panel(3, 4, 84, 21); 209 | */ 210 | 211 | /** 212 | * Cross 213 | * 214 | panels[0] = new Panel(0, 1, 28, 0); 215 | panels[1] = new Panel(0, 2, 28, 7); 216 | panels[2] = new Panel(0, 3, 28, 14); 217 | panels[3] = new Panel(0, 4, 28, 21); 218 | 219 | panels[4] = new Panel(1, 1, 0, 28); 220 | panels[5] = new Panel(1, 2, 0, 35); 221 | panels[6] = new Panel(1, 3, 0, 42); 222 | panels[7] = new Panel(1, 4, 0, 49); 223 | 224 | panels[8] = new Panel(2, 1, 56, 28); 225 | panels[9] = new Panel(2, 2, 56, 35); 226 | panels[10] = new Panel(2, 3, 56, 42); 227 | panels[11] = new Panel(2, 4, 56, 49); 228 | 229 | panels[12] = new Panel(3, 1, 28, 56); 230 | panels[13] = new Panel(3, 2, 28, 63); 231 | panels[14] = new Panel(3, 3, 28, 70); 232 | panels[15] = new Panel(3, 4, 28, 77); 233 | 234 | panels[16] = new Panel(0, 5, 28, 28); 235 | panels[17] = new Panel(1, 5, 28, 35); 236 | panels[18] = new Panel(2, 5, 28, 42); 237 | panels[19] = new Panel(3, 5, 28, 49); 238 | */ 239 | 240 | // Find largest width value in panels above 241 | for (int i = 0; i < panels.length; i++) { 242 | if (panels[i].x + 28 > config_canvasW) { 243 | config_canvasW = panels[i].x + 28; 244 | } 245 | if (panels[i].y + 7 > config_canvasH) { 246 | config_canvasH = panels[i].y + 7; 247 | } 248 | } 249 | } 250 | -------------------------------------------------------------------------------- /FlipDot/data/fonts/PixeloidMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/FlipDot/data/fonts/PixeloidMono.ttf -------------------------------------------------------------------------------- /FlipDot/data/fonts/PressStart2P.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/FlipDot/data/fonts/PressStart2P.ttf -------------------------------------------------------------------------------- /FlipDot/data/fonts/m3x6.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/FlipDot/data/fonts/m3x6.ttf -------------------------------------------------------------------------------- /FlipDot/data/fonts/zxSpectrumStrictCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/FlipDot/data/fonts/zxSpectrumStrictCondensed.ttf -------------------------------------------------------------------------------- /FlipDot/example_anim.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Example animations 3 | */ 4 | int scene = 0; 5 | void example_anim() { 6 | // Styles 7 | virtualDisplay.background(0); 8 | virtualDisplay.stroke(255); 9 | virtualDisplay.noFill(); 10 | 11 | /** 12 | * 3D cube 13 | */ 14 | if (scene == 0) { 15 | virtualDisplay.image(virtual3D, 0, 0, virtual3D.width, virtual3D.height); 16 | } 17 | 18 | /** 19 | * Spinning lines 20 | */ 21 | else if (scene == 1) { 22 | virtualDisplay.translate(virtualDisplay.width / 2, virtualDisplay.height / 2); 23 | for (int i = 0; i < 6; i++) { 24 | virtualDisplay.rotate(frameCount / 100.0); 25 | virtualDisplay.line(-virtualDisplay.width, 0, virtualDisplay.width, 0); 26 | } 27 | } 28 | 29 | /** 30 | * Square tunnel 31 | */ 32 | else if (scene == 2) { 33 | virtualDisplay.stroke(255); 34 | virtualDisplay.strokeWeight(1); 35 | virtualDisplay.noFill(); 36 | virtualDisplay.rectMode(CENTER); 37 | virtualDisplay.translate(virtualDisplay.width / 2, virtualDisplay.height / 2); 38 | for (int i = 0; i < 4; i++) { 39 | virtualDisplay.rotate(frameCount / 100.0); 40 | float s = map((i / 4.0 + frameCount/90.0)%1, 0, 1, 0, virtualDisplay.width); 41 | s = pow(1.2, s); 42 | virtualDisplay.rect(0, 0, s, s); 43 | } 44 | } 45 | 46 | /** 47 | * Clouds animation 48 | */ 49 | else if (scene == 3) { 50 | virtualDisplay.background(0); 51 | float noiseScale = 0.03; 52 | float threshold = 0.5; 53 | float speedX = 0.004; 54 | float speedY = 0.005; 55 | float speedZ = 0.002; 56 | float noiseLevel = 2.0; 57 | 58 | virtualDisplay.loadPixels(); 59 | for (int i = 0; i < virtualDisplay.pixels.length; i++) { 60 | float x = (i / 1) % virtualDisplay.width; 61 | float y = (i / 1) / virtualDisplay.width; 62 | float n = 0.0; 63 | for (int j = 0; j < noiseLevel; j += 1) { 64 | float level = pow(2, j); 65 | n += noise( 66 | (x * noiseScale + frameCount * speedX) * level, 67 | (y * noiseScale + frameCount * speedY) * level, 68 | frameCount * speedZ * level 69 | ); 70 | } 71 | n /= noiseLevel; 72 | if (n > threshold) { 73 | virtualDisplay.pixels[i] = 255; 74 | } 75 | else { 76 | virtualDisplay.pixels[i] = 0; 77 | } 78 | } 79 | virtualDisplay.updatePixels(); 80 | } 81 | 82 | 83 | // Update scene ever 10s 84 | if (frameCount % 300 == 0) { 85 | scene++; 86 | if (scene > 3) scene = 0; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /FlipDot/example_blips.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Example: Blips 3 | * 4 | * Random growing blips. 5 | */ 6 | void example_blips() { 7 | // Styles 8 | virtualDisplay.background(0); 9 | virtualDisplay.stroke(255); 10 | virtualDisplay.noFill(); 11 | 12 | // Blips config 13 | int blips_count = 5; 14 | float blips_max_speed = 150.0; 15 | float blips_weight = 40.0; 16 | 17 | // Draw blips 18 | for (int i = 0; i < blips_count; i++) { 19 | float phaseShift = noise(i) * blips_max_speed; 20 | float phase = (frameCount % phaseShift) / phaseShift; 21 | float flatPhase = floor(frameCount / phaseShift); 22 | 23 | virtualDisplay.strokeWeight(phaseShift / blips_weight); 24 | virtualDisplay.ellipse( 25 | noise(i, 1, flatPhase) * virtualDisplay.width, 26 | noise(i, 2, flatPhase) * virtualDisplay.height, 27 | phase * (virtualDisplay.width * 2), 28 | phase * (virtualDisplay.width * 2) 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /FlipDot/example_cluster_growth.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Example: Cluster Growth 3 | * 4 | * Simple cluster growth model algorithm. 5 | */ 6 | class ClusterGrowth { 7 | int[][] grid = new int[virtualDisplay.width + 1][virtualDisplay.height + 1]; 8 | float growthProbability; 9 | int holdTime = 120; 10 | 11 | ClusterGrowth() { 12 | init(); 13 | } 14 | 15 | void init() { 16 | holdTime = 120; 17 | growthProbability = random(0.05, 0.2); 18 | grid = createEmptyGrid(); 19 | seedCluster(floor(random(virtualDisplay.width)), floor(random(virtualDisplay.height)), 2); 20 | } 21 | 22 | void draw() { 23 | virtualDisplay.background(0); 24 | virtualDisplay.stroke(255); 25 | virtualDisplay.strokeWeight(1); 26 | updateGrid(); 27 | displayGrid(); 28 | 29 | // Check end state 30 | int totalGrid = virtualDisplay.width * virtualDisplay.height; 31 | int totalSum = 0; 32 | for (int i = 0; i < virtualDisplay.width; i++) { 33 | for (int j = 0; j < virtualDisplay.height; j++) { 34 | totalSum += grid[i][j]; 35 | } 36 | } 37 | // Reset 38 | if (totalGrid >= totalSum) { 39 | holdTime--; 40 | if (holdTime < 0) { 41 | init(); 42 | } 43 | } 44 | } 45 | 46 | void updateGrid() { 47 | int[][] updatedGrid = createEmptyGrid(); 48 | 49 | for (int i = 1; i < grid.length - 1; i++) { 50 | for (int j = 1; j < grid[0].length - 1; j++) { 51 | int neighbors = countNeighbors(grid, i, j); 52 | 53 | if (grid[i][j] == 0 && neighbors > 0) { 54 | if (random(1) < growthProbability) { 55 | updatedGrid[i][j] = 1; 56 | } 57 | } else { 58 | updatedGrid[i][j] = grid[i][j]; 59 | } 60 | } 61 | } 62 | grid = updatedGrid; 63 | } 64 | 65 | void displayGrid() { 66 | for (int x = 0; x < virtualDisplay.width; x++) { 67 | for (int y = 0; y < virtualDisplay.height; y++) { 68 | if (grid[x][y] == 1) { 69 | virtualDisplay.point(x, y); 70 | } 71 | } 72 | } 73 | } 74 | 75 | int[][] createEmptyGrid() { 76 | int[][] emptyGrid = new int[virtualDisplay.width + 1][virtualDisplay.height + 1]; 77 | for (int i = 0; i < emptyGrid.length; i++) { 78 | for (int j = 0; j < emptyGrid[0].length; j++) { 79 | emptyGrid[i][j] = 0; 80 | } 81 | } 82 | return emptyGrid; 83 | } 84 | 85 | int countNeighbors(int[][] grid, int x, int y) { 86 | int sum = 0; 87 | for (int i = -1; i <= 1; i++) { 88 | for (int j = -1; j <= 1; j++) { 89 | sum += grid[x + i][y + j]; 90 | } 91 | } 92 | sum -= grid[x][y]; 93 | return sum; 94 | } 95 | 96 | void seedCluster(int x, int y, int size) { 97 | for (int i = x - size / 2; i < x + size / 2; i++) { 98 | for (int j = y - size / 2; j < y + size / 2; j++) { 99 | if (i >= 0 && i < virtualDisplay.width && j >= 0 && j < virtualDisplay.height) { 100 | grid[i][j] = 1; 101 | } 102 | } 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /FlipDot/games_tetris.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * Tetris game in Processing for FlipDot display 3 | * 4 | * Settings: 5 | * Tetris().speed = 2.0; // Game speed 6 | * Tetris().scale = 2; // Scale of game(per-dot) 7 | * Tetris().board_width = 14; // Width of game board 8 | * Tetris().board_height = 14; // Height of game board 9 | * 10 | */ 11 | Tetris tetris = new Tetris(); 12 | 13 | // Tetris game tick 14 | void games_tetris() { 15 | tetris.update(); 16 | tetris.draw(); 17 | } 18 | 19 | /** 20 | * Tetris game class 21 | */ 22 | class Tetris { 23 | Tetromino tetromino; 24 | 25 | // Game settings 26 | int status = 0; // 0 = playing, 1 = game over, 2 = line removing 27 | float speed = 2.0; 28 | int scale = 2; 29 | int board_width = 7; 30 | int board_height = 14; 31 | int board_rotation = 0; 32 | int[] board; 33 | 34 | // Input settings 35 | int input_delay = 70; // ms 36 | boolean input_down = false; 37 | boolean input_left = false; 38 | boolean input_right = false; 39 | int input_down_time = 0; 40 | int input_strafe_time = 0; 41 | 42 | // Misc vars 43 | float anim_progress = 0.0; 44 | int remove_line; 45 | 46 | Tetris() { 47 | this.restart(); 48 | } 49 | 50 | // State: Playing tick 51 | void tick_playing() { 52 | // Check inputs 53 | this.check_input(); 54 | 55 | // Game tick 56 | if (frameCount % round(config_fps / this.speed) == 0) { 57 | this.move('t'); 58 | } 59 | // Check for completed rows 60 | this.check_rows(); 61 | } 62 | 63 | // Check rows for completed rows 64 | void check_rows() { 65 | // Check for completed rows 66 | for (int y = this.board_height - 1; y >= 0; y--) { 67 | boolean row_complete = true; 68 | for (int x = 0; x < this.board_width; x++) { 69 | if (this.board[x + y * this.board_width] == 0) { 70 | row_complete = false; 71 | } 72 | } 73 | if (row_complete) { 74 | this.remove_line(y); 75 | break; 76 | } 77 | } 78 | } 79 | 80 | // Remove completed rows 81 | void remove_line(int line) { 82 | // Remove line 83 | this.status = 2; 84 | this.remove_line = line; 85 | 86 | // Increase speed 87 | this.speed += 0.1; 88 | } 89 | 90 | // Draw tick for removing lines 91 | void draw_removing_line() { 92 | if (this.anim_progress < 1) { 93 | this.draw_board(); 94 | // Animate line scrolling across removed live 95 | virtualDisplay.fill(0); 96 | virtualDisplay.rect( 97 | 0, 98 | this.remove_line * this.scale, 99 | virtualDisplay.width * 2.0 * this.anim_progress, 100 | this.scale 101 | ); 102 | this.anim_progress += 0.05; 103 | } 104 | else { 105 | // When animation finished, Remove row 106 | for (int x = 0; x < this.board_width; x++) { 107 | this.board[x + this.remove_line * this.board_width] = 0; 108 | } 109 | // Move all rows above down 110 | for (int y = this.remove_line; y > 0; y--) { 111 | for (int x = 0; x < this.board_width; x++) { 112 | this.board[x + y * this.board_width] = this.board[x + (y - 1) * this.board_width]; 113 | } 114 | } 115 | // Contine game play 116 | this.anim_progress = 0.0; 117 | this.status = 0; 118 | this.remove_line = -1; 119 | // Draw updated board 120 | this.draw_board(); 121 | } 122 | } 123 | 124 | // Draw: State: Game over 125 | void tick_game_over() { 126 | this.draw_board(); 127 | virtualDisplay.fill(255); 128 | virtualDisplay.rect(0, this.board_height * this.scale - (this.anim_progress * this.board_height * this.scale * 2.0), this.board_width * this.scale, this.board_height * this.scale); 129 | if (this.anim_progress > 0.5) { 130 | this.board = new int[this.board_width * this.board_height]; 131 | 132 | // Game over text 133 | virtualDisplay.fill(255); 134 | virtualDisplay.textFont(FlipDotFont_pixel); 135 | virtualDisplay.textLeading(7); 136 | virtualDisplay.textAlign(CENTER, CENTER); 137 | virtualDisplay.text("Game\nOver", this.board_width * this.scale * 0.5, this.board_height * this.scale * 0.25); 138 | 139 | // Restart text 140 | if (frameCount % 15 < 11) { 141 | virtualDisplay.textAlign(CENTER, CENTER); 142 | virtualDisplay.text("play", round(this.board_width * this.scale * 0.5), round(this.board_height * this.scale * 0.7)); 143 | } 144 | } 145 | 146 | // Animate 147 | if (this.anim_progress < 1) { 148 | this.anim_progress += 0.03; 149 | } 150 | } 151 | 152 | // Interaction 153 | void check_input() { 154 | // Down 155 | if (this.input_down && millis() - this.input_down_time > this.input_delay) { 156 | this.move('d'); 157 | this.input_down_time = millis(); 158 | } 159 | 160 | // Left/Right 161 | if (this.input_left && millis() - this.input_strafe_time > this.input_delay) { 162 | this.move('l'); 163 | this.input_strafe_time = millis(); 164 | } 165 | else if (this.input_right && millis() - this.input_strafe_time > this.input_delay) { 166 | this.move('r'); 167 | this.input_strafe_time = millis(); 168 | } 169 | } 170 | 171 | // Move tetromino 172 | void move(char direction) { 173 | switch (direction) { 174 | case 'l': 175 | // Move & check collision 176 | this.tetromino.move('l'); 177 | if (this.check_collisions()) { 178 | this.tetromino.move('r'); 179 | } 180 | break; 181 | 182 | case 'r': 183 | // Move & check collision 184 | this.tetromino.move('r'); 185 | if (this.check_collisions()) { 186 | this.tetromino.move('l'); 187 | } 188 | break; 189 | 190 | case 'd': 191 | // Move & check collision 192 | this.tetromino.move('d'); 193 | if (this.check_collisions()) { 194 | this.tetromino.move('u'); 195 | } 196 | break; 197 | 198 | // Game tick (down) 199 | case 't': 200 | // Move & check collision 201 | this.tetromino.move('d'); 202 | if (this.check_collisions()) { 203 | this.tetromino.move('u'); 204 | this.lock_tetromino(); 205 | this.new_tetromino(); 206 | } 207 | break; 208 | } 209 | } 210 | 211 | // Create a new tetromino 212 | void new_tetromino() { 213 | // Create new tetromino 214 | this.tetromino = new Tetromino(this); 215 | if (this.check_collisions()) { 216 | this.status_gameover(); 217 | } 218 | } 219 | 220 | // Change game state: Game over 221 | void status_gameover () { 222 | this.status = 1; 223 | this.anim_progress = 0; 224 | } 225 | 226 | // Rotate tetromino 227 | void rotate() { 228 | // Rotate & check collision 229 | this.tetromino.rotate(1); 230 | if (this.check_collisions()) { 231 | this.tetromino.rotate(-1); 232 | } 233 | } 234 | 235 | // Once collision detected, lock tetromino to board 236 | void lock_tetromino() { 237 | // Lock tetromino to board 238 | for (int i = 0; i < this.tetromino.pixelMap.length; i += 2) { 239 | int x = this.tetromino.pixelMap[i]; 240 | int y = this.tetromino.pixelMap[i + 1]; 241 | int index = x + y * this.board_width; 242 | if (index > 0 && index < this.board.length) { 243 | this.board[index] = 1; 244 | } 245 | } 246 | } 247 | 248 | // Check if tetromino collides 249 | boolean check_collisions() { 250 | // Check tetromino collision 251 | // Check each pixel of tetromino 252 | for (int i = 0; i < this.tetromino.pixelMap.length; i += 2) { 253 | int x = this.tetromino.pixelMap[i]; 254 | int y = this.tetromino.pixelMap[i + 1]; 255 | 256 | // Check if pixel is out of bounds 257 | if (x < 0) { 258 | return true; 259 | } 260 | if (x >= this.board_width) { 261 | return true; 262 | } 263 | 264 | // Hit floor 265 | if (y >= this.board_height) { 266 | return true; 267 | } 268 | 269 | // Check if pixel is already occupied 270 | int index = x + y * this.board_width; 271 | if (index > 0 && index < this.board.length && this.board[index] > 0) { 272 | return true; 273 | } 274 | } 275 | return false; 276 | } 277 | 278 | // Game update 279 | void update() { 280 | switch (this.status) { 281 | case 0: 282 | this.tick_playing(); 283 | break; 284 | } 285 | } 286 | 287 | // Draw tick 288 | void draw() { 289 | virtualDisplay.translate(virtualDisplay.width / 2, virtualDisplay.height / 2); 290 | virtualDisplay.rotate(this.board_rotation * -HALF_PI); 291 | virtualDisplay.translate(virtualDisplay.height / -2, virtualDisplay.width / -2); 292 | virtualDisplay.background(0); 293 | 294 | switch (this.status) { 295 | case 0: 296 | this.draw_board(); 297 | this.draw_tetromino(); 298 | break; 299 | 300 | case 1: 301 | this.tick_game_over(); 302 | break; 303 | 304 | // Removing line 305 | case 2: 306 | this.draw_removing_line(); 307 | break; 308 | } 309 | } 310 | 311 | // Draw tetris board 312 | void draw_board() { 313 | virtualDisplay.noStroke(); 314 | 315 | // Draw current tetromino 316 | for (int i = 0; i < board.length; i++) { 317 | if (board[i] > 0) { 318 | virtualDisplay.fill(255); 319 | virtualDisplay.rect( 320 | (i % this.board_width) * this.scale, 321 | (i / this.board_width) * this.scale, 322 | this.scale, 323 | this.scale 324 | ); 325 | } 326 | } 327 | } 328 | 329 | // Draw current tetromino 330 | void draw_tetromino() { 331 | virtualDisplay.fill(255); 332 | virtualDisplay.noStroke(); 333 | 334 | // Draw current tetromino 335 | for (int i = 0; i < this.tetromino.render().length; i += 2) { 336 | virtualDisplay.rect( 337 | this.tetromino.render()[i] * this.scale, 338 | this.tetromino.render()[i + 1] * this.scale, 339 | this.scale, 340 | this.scale 341 | ); 342 | } 343 | } 344 | 345 | // Restart game 346 | void restart() { 347 | this.status = 0; 348 | this.speed = 2.0; 349 | this.board = new int[this.board_width * this.board_height]; 350 | this.new_tetromino(); 351 | } 352 | } 353 | 354 | 355 | /** 356 | * Tetromino class 357 | */ 358 | class Tetromino { 359 | int type; 360 | int x; 361 | int y; 362 | int r; 363 | int[] pixelMap; 364 | int[][][] tetris_tetrominos = { 365 | // I 366 | { 367 | {0,0,-1,0,-2,0,1,0}, 368 | {0,0,0,-1,0,1,0,2}, 369 | {0,1,1,1,-1,1,-2,1}, 370 | {-1,0,-1,-1,-1,1,-1,2}, 371 | }, 372 | // J 373 | { 374 | {0,0,-1,0,1,0,-1,-1}, 375 | {0,0,0,-1,1,-1,0,1}, 376 | {0,0,-1,0,1,0,1,1}, 377 | {0,0,0,-1,0,1,-1,1} 378 | }, 379 | // L 380 | { 381 | {0,0,-1,0,1,0,1,-1}, 382 | {0,0,0,-1,0,1,1,1}, 383 | {0,0,-1,0,-1,1,1,0}, 384 | {0,0,0,-1,-1,-1,0,1} 385 | }, 386 | // O 387 | { 388 | {0,0,-1,0,-1,1,0,1}, 389 | {0,0,-1,0,-1,1,0,1}, 390 | {0,0,-1,0,-1,1,0,1}, 391 | {0,0,-1,0,-1,1,0,1} 392 | }, 393 | // S 394 | { 395 | {0,0,-1,0,0,-1,1,-1}, 396 | {0,0,0,-1,1,0,1,1}, 397 | {0,0,1,0,0,1,-1,1}, 398 | {0,0,-1,0,-1,-1,0,1} 399 | }, 400 | // T 401 | { 402 | {0,0,0,-1,-1,0,1,0}, 403 | {0,0,0,-1,0,1,1,0}, 404 | {0,0,-1,0,1,0,0,1}, 405 | {0,0,-1,0,0,-1,0,1} 406 | }, 407 | // 2 408 | { 409 | {0,0,0,-1,-1,-1,1,0}, 410 | {0,0,0,1,1,0,1,-1}, 411 | {0,0,-1,0,0,1,1,1}, 412 | {0,0,0,-1,-1,0,-1,1} 413 | } 414 | }; 415 | 416 | Tetromino(Tetris tetris) { 417 | this.type = floor(random(this.tetris_tetrominos.length)); 418 | this.x = round(tetris.board_width / 2.0); 419 | this.y = -1; 420 | this.r = 0; 421 | this.pixelMap = new int[8]; 422 | 423 | this.update_pixels(); 424 | } 425 | 426 | // Move tetromino 427 | void move(char dir) { 428 | switch (dir) { 429 | case 'l': 430 | this.x--; 431 | break; 432 | case 'r': 433 | this.x++; 434 | break; 435 | case 'd': 436 | this.y++; 437 | break; 438 | case 'u': 439 | this.y--; 440 | break; 441 | } 442 | this.update_pixels(); 443 | } 444 | 445 | // Rotate tetromino 446 | void rotate(int direction) { 447 | this.r = (this.r + direction + 4) % 4; 448 | this.update_pixels(); 449 | } 450 | 451 | // Update pixel map for display 452 | void update_pixels() { 453 | for (int i = 0; i < this.tetris_tetrominos[this.type][this.r].length; i += 2) { 454 | this.pixelMap[i] = this.tetris_tetrominos[this.type][this.r][i] + this.x; 455 | this.pixelMap[i + 1] = this.tetris_tetrominos[this.type][this.r][i + 1] + this.y; 456 | } 457 | } 458 | 459 | // Return pixel map 460 | int[] render() { 461 | return this.pixelMap; 462 | } 463 | } 464 | 465 | 466 | /** 467 | * Key presses for Tetris 468 | * 469 | * This is a global listener for key presses. 470 | * if you want to use key presses elsewhere in your own code 471 | * you will need to extend of rename these functions. 472 | */ 473 | void keyPressed() { 474 | // Down 475 | if (keyCode == DOWN) { 476 | tetris.move('d'); 477 | tetris.input_down = true; 478 | tetris.input_down_time = millis(); 479 | } 480 | 481 | // Left or Right 482 | if (keyCode == LEFT) { 483 | tetris.move('l'); 484 | tetris.input_left = true; 485 | tetris.input_strafe_time = millis(); 486 | } 487 | else if (keyCode == RIGHT) { 488 | tetris.move('r'); 489 | tetris.input_right = true; 490 | tetris.input_strafe_time = millis(); 491 | } 492 | 493 | // New game/start 494 | if (keyCode == ENTER && tetris.status != 0) { 495 | tetris.restart(); 496 | } 497 | 498 | // Rotate 499 | if (keyCode == UP) { 500 | tetris.rotate(); 501 | } 502 | } 503 | 504 | // Key releases for Tetris 505 | void keyReleased() { 506 | // Down 507 | if (keyCode == DOWN) { 508 | tetris.input_down = false; 509 | } 510 | // Left 511 | if (keyCode == LEFT) { 512 | tetris.input_left = false; 513 | } 514 | // Right 515 | if (keyCode == RIGHT) { 516 | tetris.input_right = false; 517 | } 518 | } 519 | -------------------------------------------------------------------------------- /FlipDot/stage.pde: -------------------------------------------------------------------------------- 1 | PGraphics virtualDisplay; 2 | PGraphics virtual3D; 3 | 4 | /** 5 | * Create vitural canvas to draw onto 6 | */ 7 | void stages_setup() { 8 | // Create virtual stages 9 | virtualDisplay = createGraphics( 10 | config_canvasW, 11 | config_canvasH, 12 | P2D 13 | ); 14 | 15 | // Virtual 3D canvas for 3D animations 16 | virtual3D = createGraphics(virtualDisplay.width, virtualDisplay.height, P3D); 17 | } 18 | 19 | 20 | /** 21 | * Process image. 22 | */ 23 | void stage_process() { 24 | virtualDisplay.filter(THRESHOLD, 0.5); 25 | virtualDisplay.loadPixels(); 26 | 27 | for (int i = 0; i < panels.length; i++) { 28 | panels[i].process(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /FlipDot/ui.pde: -------------------------------------------------------------------------------- 1 | /** 2 | * UI 3 | * 4 | * Useful for debugging and FlipDot simulator. 5 | */ 6 | float ui_dot_size; 7 | long ui_start_time; 8 | void ui_setup() { 9 | // Start time 10 | ui_start_time = millis(); 11 | 12 | // Calc dot size 13 | float min_ui_space = 300; 14 | ui_dot_size = min( 15 | (width - (border * 2.0) - min_ui_space) / config_canvasW, 16 | (height - (border * 2.0)) / config_canvasH 17 | ); 18 | } 19 | 20 | 21 | /** 22 | * Render UI to Processing window 23 | */ 24 | void ui_render() { 25 | float ui_offset = ui_dot_size * config_canvasW + (border * 2); 26 | 27 | stroke(255); 28 | line(ui_offset - border / 2, border, ui_offset - border / 2, height - border); 29 | line(ui_offset, 100, width - border, 100); 30 | 31 | fill(255); 32 | textSize(24); 33 | textLeading(26); 34 | noStroke(); 35 | text("FlipDot controller", ui_offset, 60); 36 | textSize(15); 37 | text("https://github.com/owenmcateer/FlipDots", ui_offset, 85); 38 | 39 | // App stats 40 | text(config_cast ? "Casting" : "Not casting", ui_offset, 120); 41 | text(round(frameRate) + " fps (target: " + config_fps + "fps)", ui_offset, 140); 42 | 43 | // Calculate runtime 44 | long elapsed_time = millis() - ui_start_time; 45 | // Format the time as HH:MM:SS 46 | int hours = (int) (elapsed_time / (1000 * 60 * 60)); 47 | int minutes = (int) ((elapsed_time - (hours * 1000 * 60 * 60)) / (1000 * 60)); 48 | int seconds = (int) ((elapsed_time - (hours * 1000 * 60 * 60) - (minutes * 1000 * 60)) / 1000); 49 | String formatted_time = String.format("%02d:%02d:%02d", hours, minutes, seconds); 50 | text("Runtime: " + formatted_time, ui_offset, 160); 51 | 52 | // Simulator 53 | if (config_show_simulator) { 54 | ui_simulate(); 55 | } 56 | 57 | // Virtual canvas 58 | float maxSize = width - ui_offset - border; 59 | float vcScaleWidth = maxSize / virtualDisplay.width; 60 | float vcScaleHeight = maxSize / virtualDisplay.height; 61 | float vcScale = min(vcScaleWidth, vcScaleHeight); 62 | stroke(255); 63 | strokeWeight(2); 64 | rect(ui_offset, 180, virtualDisplay.width * vcScale, virtualDisplay.height * vcScale); 65 | image(virtualDisplay, ui_offset, 180, virtualDisplay.width * vcScale, virtualDisplay.height * vcScale); 66 | 67 | // Casting mode 68 | textSize(15); 69 | fill(255); 70 | noStroke(); 71 | push(); 72 | translate(ui_offset, 220 + virtualDisplay.height * vcScale); 73 | // Network adapters 74 | if (castOver == 1) { 75 | text("Casting mode: ETH:", 0, 0); 76 | for (int i = 0; i < netAdapters.length; i++) { 77 | fill(255); 78 | text(netAdapters[i], 15, 20 + i * 20); 79 | 80 | fill(212, 15, 15); 81 | try { 82 | if (adaptersNet[i].ip() != null) { 83 | fill(18, 222, 45); 84 | } 85 | } catch(NullPointerException e) {} 86 | 87 | ellipse(6, 15 + i * 20, 7, 7); 88 | fill(0); 89 | } 90 | } 91 | else if (castOver == 2) { 92 | text("Casting mode: USB:", 0, 0); 93 | for (int i = 0; i < serialAdapters.length; i++) { 94 | fill(255); 95 | text(serialAdapters[i], 15, 20 + i * 20); 96 | 97 | fill(18, 222, 45); 98 | ellipse(6, 15 + i * 20, 7, 7); 99 | fill(0); 100 | } 101 | } 102 | pop(); 103 | } 104 | 105 | 106 | /** 107 | * Processing virtual canvas to simulation display 108 | */ 109 | void ui_simulate() { 110 | push(); 111 | translate(border, border); 112 | ellipseMode(CORNER); 113 | for (int i = 0; i < panels.length; i++) { 114 | push(); 115 | translate(panels[i].x * ui_dot_size, panels[i].y * ui_dot_size); 116 | 117 | fill(0); 118 | if (config_simulate_changes && panels[i].has_changed) { 119 | stroke(255, 0, 0); 120 | strokeWeight(1); 121 | } else { 122 | noStroke(); 123 | } 124 | rect(0, 0, 28 * ui_dot_size, 7 * ui_dot_size); 125 | 126 | for (int col = 0; col < 28; col++) { 127 | for (int row = 0; row < 7; row++) { 128 | noStroke(); 129 | fill(boolean(panels[i].buffer[col] & 1 << row) ? 255 : 0); 130 | circle(col * ui_dot_size, row * ui_dot_size, ui_dot_size - 2); 131 | } 132 | } 133 | pop(); 134 | } 135 | pop(); 136 | } 137 | 138 | 139 | /** 140 | * Seconds to time string 141 | * 142 | * @param {int} seconds | Second elapsed 143 | * @return {String} | Date stamp HH:MM:SS 144 | */ 145 | String secondsToTime(int seconds) { 146 | int hours = seconds / 3600; 147 | int minutes = (seconds % 3600) / 60; 148 | int secs = seconds % 60; 149 | return String.format("%02d:%02d:%02d", hours, minutes, secs); 150 | } 151 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FlipDot display 2 | 3 | This repo contains a [Processing](https://processing.org/) sketch to control FlipDot panels from [AlfaZeta](https://flipdots.com). It uses a virtual display you can draw and animate on that then gets cast to your FlipDot display panels. 4 | 5 | *Note:* if you don't have a FlipDot display you can still use this software as a FlipDot simulator. 6 | 7 | - For the JavaScript version see [CastCanvas](./CastCanvas/) 8 | - For the FlipDigit library [see this repo](https://github.com/owenmcateer/FlipDigits) 9 | 10 | ![FlipDot Controller simulator](./assets/FlipDot-controller.gif) 11 | 12 | https://user-images.githubusercontent.com/1763300/214524873-d32401c9-916a-4d84-ae42-95b464082fdb.mp4 13 | 14 | ### More examples 15 | - [Cluster growth](assets/examples/example_cluster_growth.gif) 16 | - [Blips](assets/examples/example_blips.gif) 17 | - [Clouds](assets/examples/example_clouds.gif) 18 | - [Square tunnel](assets/examples/example_squares.gif) 19 | - [3D Cube](assets/examples/example_3d_cube.gif) 20 | 21 | ## What are FlipDot displays? 22 | 23 | Flip-dots or Flip-disc, are made of small disks with a permanent magnetic that physically flip back and forth revealing one side or the other. Powered by a small electromagnetic to flip it retains its state even after power is disconnected. Click here if you’d like to [know more](https://flipdots.com/en/electromagnetic-flip-disc-technology-how-it-works/). 24 | 25 | The AlfaZeta XY5 FlipDot display includes its own controller board that communicates over a RS485 serial connection using its own protocol. This repo simplifies connecting and streaming images to the FlipDot display. 26 | 27 | 28 | 29 | ## Hardware requirements 30 | 31 | *Remember if you don't have a FlipDot display you can still use this software as a FlipDot simulator.* 32 | 33 | - FlipDot panel from [AlfaZeta](https://flipdots.com) 34 | - 24V PSU (1A per panel) 35 | - RS485 converter 36 | - - ETH: [ETH-UKW485SR140](https://www.sklep.uk-system.pl/konwertery-eth-ukw485sr140-z-4-portami-szeregowymi-rs485-p-41.html) (best for high framerates) 37 | - - ETH: [Waveshare](https://www.waveshare.com/product/iot-communication/wired-comm-converter/ethernet-to-rs232-rs485.htm) 38 | - - ETH: [PUSR](https://www.pusr.com/products/serial-to-ethernet-converters.html) 39 | - - USB RS485 [Amazon](https://www.amazon.com/DZS-Elec-Converter-Communication-Centralized/dp/B07CMY1DGK/), [Aliexpress](https://www.aliexpress.us/item/3256802833469866.html) 40 | - Software: [Processing 4](https://processing.org/download) 41 | 42 | 43 | ## Setup 44 | 45 | Each 28x14 panel is made up of two 7x28 panels on one board, each with their controller we need to daisy chain together. 46 | **!SAFETY PRECAUTION!** If you don't know what you're doing, ask for help. 24V might not kill you but it will hurt and break your equipment. 47 | 48 | ### 1) Wiring 49 | 50 | ![FlipDot control board](./assets/FlipDot-controller.png) 51 | 52 | - Connect 24V power supply to the 24V DC in screw terminals 53 | - Connect RS485 +/- with a JR11 plug or the screw terminals 54 | 55 | ### 2) DIP switches 56 | 57 | Each controller has two DIP switches that need to be set. **3-pin Baud-rate** and **8-pin Panel address** 58 | 59 | ![FlipDot DIP pins](./assets/FlipDot-DIP-pins.png) 60 | 61 | #### Baud-rate (3-pin DIP) 62 | 63 | Communication transfer rate is set as follows. For my setup I went with the fastest value of 57600 ↓↑↑ as I found 9600 too slow to handle 20fps. 64 | 65 | | Value | ON | Baud rate| 66 | |------|-----|--------| 67 | | 0 | ↓↓↓ | N/A| 68 | | 1 | ↑↓↓ | N/A| 69 | | 2 | ↓↑↓ | N/A| 70 | | 3 | ↑↑↓ | 9600| 71 | | 4 | ↓↓↑ | 19200| 72 | | 5 | ↑↓↑ | 38400| 73 | | 6 | ↓↑↑ | 57600| 74 | | 7 | ↑↑↑ | 9600| 75 | | | OFF || 76 | 77 | #### Address (8-pin DIP) 78 | 79 | This is the address ID used when pushing out the image data, each panel listens for its data. 80 | 81 | | Pins | Description| 82 | |-----|--------------| 83 | | 0-5 | Address in binary code (natural)| 84 | | 6 | Magnetising time: OFF: 500μs(default), ON: 450μs| 85 | | 7 | Test mode: ON/OFF. OFF = normal operation| 86 | 87 | *Note: Reducing the magnetising time to 450μs will flip the dots faster but runs the risk of them not flipping at all.* 88 | 89 | ### 3) Serial data 90 | 91 | To send frame data from your computer to the display you can do so over ETH or USB. For small displays USB is fine but larger displays will require an ETH solution. 92 | See suggested serial products above. 93 | 94 | #### ETH convertor 95 | 96 | **PC > ETH > ETH-RS485 convertor > FlipDot panels** 97 | 98 | For an ETH solution set the following settings in [config.pde](./FlipDot/config.pde) 99 | Set `castOver` to `1` 100 | List all ETH convertor IP addresses and port numbers in `netAdapters` 101 | 102 | #### USB convertor 103 | 104 | **PC > USB-RS485 convertor > FlipDot panels** 105 | 106 | For an USB solution set the following settings in [config.pde](./FlipDot/config.pde) 107 | Set `castOver` to `2` 108 | List all USB convertor COMs port address and baud rate `serialAdapters` 109 | 110 | ### 4) Processing 111 | 112 | Install [Processing 4](https://processing.org/download) for your system and launch [FlipDot/FlipDot.pde](./FlipDot/FlipDot.pde) 113 | 114 | **[config.pde](./FlipDot/config.pde)** 115 | Make sure you have set your convertor type as shown above. 116 | 117 | Set `config_cast` to `true` to cast data. 118 | 119 | Next set the FlipDot panels and display settings [config.pde](./FlipDot/config.pde). For a Single 28x14 panel you can leave config.pde as it is. 120 | Add a config line for each FlipDot panel you have: 121 | `panels[0] = new Panel(0, 1, 0, 0);` 122 | 1) Adapter ID (see net/serialAdapters) 123 | 2) Panel ID (set on the 3-pin DIP switch) 124 | 3) X-position in total display 125 | 4) Y-position in total display 126 | 127 | Finally set the number of panels you have in the following line: `Panel[] panels = new Panel[2];` 128 | 129 | See [config.pde](./FlipDot/config.pde) for more examples and layouts. 130 | 131 | ### 5) Coding animations 132 | 133 | Now you can draw and animate whatever you want! Everything gets drawn to `virtualDisplay`, I recommend looking at [example_anim.pde](./FlipDot/example_anim.pde) and [example_blips.pde](./FlipDot/example_blips.pde) for some examples of coding animations. 134 | 135 | Don't forget to share your creations with me @motus_art on [IG](https://instagram.com/motus_art)/[TW](https://x.com/motus_art) 136 | 137 | https://user-images.githubusercontent.com/1763300/214339655-2efb0460-cefd-432a-bd86-d43668057a87.mp4 138 | 139 | ## Games 140 | 141 | Any pixel based game will work great on these displays. While not quite Doom in this resolution, think Snake, Tetris and Pong. 142 | 143 | ### Tetris 144 | 145 | A fully playable Tetris game on a FlipDot display. You can find the code here: [games_tetris.pde](./FlipDot/games_tetris.pde) 146 | 147 | https://user-images.githubusercontent.com/1763300/220141220-da981003-57d3-4386-afc8-1956685caede.mp4 148 | 149 | 150 | -------------------------------------------------------------------------------- /assets/Binary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/Binary.png -------------------------------------------------------------------------------- /assets/FlipDot-DIP-pins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/FlipDot-DIP-pins.png -------------------------------------------------------------------------------- /assets/FlipDot-Video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/FlipDot-Video.png -------------------------------------------------------------------------------- /assets/FlipDot-controller.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/FlipDot-controller.gif -------------------------------------------------------------------------------- /assets/FlipDot-controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/FlipDot-controller.png -------------------------------------------------------------------------------- /assets/examples/example_3d_cube.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/examples/example_3d_cube.gif -------------------------------------------------------------------------------- /assets/examples/example_blips.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/examples/example_blips.gif -------------------------------------------------------------------------------- /assets/examples/example_clouds.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/examples/example_clouds.gif -------------------------------------------------------------------------------- /assets/examples/example_cluster_growth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/examples/example_cluster_growth.gif -------------------------------------------------------------------------------- /assets/examples/example_squares.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/assets/examples/example_squares.gif -------------------------------------------------------------------------------- /example_3d_cube.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/example_3d_cube.gif -------------------------------------------------------------------------------- /example_blips.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/example_blips.gif -------------------------------------------------------------------------------- /example_clouds.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/example_clouds.gif -------------------------------------------------------------------------------- /example_cluster_growth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/example_cluster_growth.gif -------------------------------------------------------------------------------- /example_squares.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenmcateer/FlipDots/7a0937f13e4b607f62d1a0a581776e30067d484c/example_squares.gif --------------------------------------------------------------------------------