Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spacebro/ofxspacebroclient
An addon for openFrameworks to connect to spacebro with a single line.
https://github.com/spacebro/ofxspacebroclient
Last synced: 13 days ago
JSON representation
An addon for openFrameworks to connect to spacebro with a single line.
- Host: GitHub
- URL: https://github.com/spacebro/ofxspacebroclient
- Owner: spacebro
- Created: 2016-02-12T14:20:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-26T07:32:10.000Z (over 8 years ago)
- Last Synced: 2024-11-21T04:11:40.454Z (2 months ago)
- Language: C++
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
An addon for openFrameworks to connect to [spacebro](https://github.com/soixantecircuits/spacebro) with a single line.
# Install
You need this repo, and clone other addons. We've prepared a script to do that for you.
Install [openFrameworks](http://openframeworks.cc) and then
```
cd your_of_path/addons
git clone [email protected]:soixantecircuits/ofxSpacebroClient.git
cd ofxSpacebroClient
bash clone_addons.sh
```# Usage
First, you need to regsiter your events
```c++
// Use spacebroClient.registerEvent(eventName) to create ofEvents you can listen to
ofAddListener(spacebroClient.registerEvent("stuff"), this, &ofApp::onStuff)
```Then you can setup your client and register to the server
```c++
// Use spacebroClient.setup(clientName) to register as clientName to the server
spacebroClient.setup("ofxSpacebroClient")
```# Test
## Run spacebro
Spacebro receives and broadcasts all messages to its clients.
```
git clone [email protected]:soixantecircuits/spacebro.git
cd spacebro
npm i
npm start
```## Run spacebro-client example
Run some other example to send data to ofxSpacebroClient example.
```
git clone [email protected]:soixantecircuits/spacebro-client.git
cd spacebro-client
npm i
npm start
```## Run this example
Now you're ready to receive data
```
cd example
make
make run
```