{"id":15669782,"url":"https://github.com/plasticrake/opcserver","last_synced_at":"2025-05-06T20:22:46.557Z","repository":{"id":54034510,"uuid":"62175189","full_name":"plasticrake/OpcServer","owner":"plasticrake","description":"Open Pixel Control (OPC) server for Arduino","archived":false,"fork":false,"pushed_at":"2019-05-16T02:00:56.000Z","size":14,"stargazers_count":13,"open_issues_count":4,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T02:34:47.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plasticrake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-28T21:22:25.000Z","updated_at":"2024-11-05T22:56:16.000Z","dependencies_parsed_at":"2022-08-13T06:10:46.261Z","dependency_job_id":null,"html_url":"https://github.com/plasticrake/OpcServer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2FOpcServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2FOpcServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2FOpcServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2FOpcServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plasticrake","download_url":"https://codeload.github.com/plasticrake/OpcServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252761952,"owners_count":21800228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T14:41:15.938Z","updated_at":"2025-05-06T20:22:46.531Z","avatar_url":"https://github.com/plasticrake.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpcServer\n\n[![Build Status](https://travis-ci.org/plasticrake/OpcServer.svg?branch=master)](https://travis-ci.org/plasticrake/OpcServer)\n\nOpen Pixel Control (OPC) server for Arduino.\n\nCompatible with boards that utilize Arduino style [WiFiServer](https://www.arduino.cc/en/Reference/WiFiServer) / [WiFiClient](https://www.arduino.cc/en/Reference/WiFiClient) APIs.\n\n- **ESP8266**\n  - NodeMCU\n  - [Adafruit HUZZAH](https://www.adafruit.com/products/2471)\n  - ...\n- **ATSAMD21**\n  - [Arduino Zero](https://www.arduino.cc/en/Main/ArduinoBoardZero) with [WiFi Shield 101](https://www.arduino.cc/en/Main/ArduinoWiFiShield101) **(compiles, not tested)**\n  - [Adafruit Feather M0 WiFi - ATSAMD21 + ATWINC1500](https://www.adafruit.com/product/3010) **(compiles, not tested)**\n- **Particle** (Formerly Spark)\n  - [Photon](https://docs.particle.io/datasheets/photon-datasheet/)\n  - [Core](https://docs.particle.io/datasheets/core-datasheet/) **(compiles, not tested)**\n\nIf you've run this successfully on other boards let me know!\n\n# Installation\n\n## Arduino IDE\n1. In the Arduino IDE, Choose **Sketch** \u003e **Include Library** \u003e **Manage Libraries**\n2. Search for **OpcServer**\n3. Click **Install**\n\n## [PlatformIO](http://platformio.org/lib/show/350/OpcServer)\n1. platformio lib install 350\n\n## Particle\n1. Copy files from src/* into your project\n\n# Usage\nSee [examples](https://github.com/plasticrake/OpcServer/tree/master/examples).\n### Includes\n```c++\n#include \"OpcServer.h\"\n```\nDepending on your platform you may need to add other headers. For example _ESP8266WiFi.h_ for ESP8266.\n\n### Initialize\nInitialize `OpcServer` with `WiFiServer` (or `TCPServer` for Particle), `OpcClient` sized for the number of clients you'd like to support, and a `buffer` large enough for the OPC messages you'd like to receive.\n```c++\nWiFiServer server = WiFiServer(OPC_PORT);\nOpcClient opcClients[OPC_MAX_CLIENTS];\nuint8_t buffer[OPC_BUFFER_SIZE * OPC_MAX_CLIENTS];\n\nOpcServer opcServer = OpcServer(server, OPC_CHANNEL,\n  opcClients, OPC_MAX_CLIENTS,\n  buffer, OPC_BUFFER_SIZE);\n```\n\n### setup()\n\nOptionally add any callback functions you'd like `OpcServer` to run when a message is received or a client connects/disconnects.\n```c++\nopcServer.setMsgReceivedCallback(cbOpcMessage);\nopcServer.setClientConnectedCallback(cbOpcClientConnected);\nopcServer.setClientDisconnectedCallback(cbOpcClientDisconnected);\n```\nThen call `.begin()`.\n```c++\nopcServer.begin();\n```\n\n### loop()\nCall `.process()` in your loop to process any incoming OPC data.\n```c++\nopcServer.process();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasticrake%2Fopcserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplasticrake%2Fopcserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasticrake%2Fopcserver/lists"}