Good morning
I am trying to control the led using 4universe artnet.
Addon is https://github.com/hiroyuki/ofxArtnet
Is in use.
the problem is
I manually set up artnet's ip on the Mac's network
You have specified "192.168.1.8".
By the way
The interface of 4universe artnet is confirmed on OF
Artnet.senddmx ("192.168.1.8")
Not found.
Can you solve the problem?
Here is the code I used:
pragma once
include "ofMain.h"
include "ofxArtnet.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseEntered(int x, int y);
void mouseExited(int x, int y);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
ofxArtnet anNode;
unsigned char dmxData [512];
ofColor color;
};
include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetWindowShape( 800, 800);
ofSetFrameRate(60);
ofSetBackgroundAuto(true);
ofBackground(0 ,0 , 0);
color.set(0,0,0);
anNode.setup("192.168.1.8", 0x0 , 0 );
for(int i = 0; i<512 ; i ++){
dmxData[i] = 0;
}
}
//--------------------------------------------------------------
void ofApp::update(){
float r = ofMap(ofGetMouseX(), 0 , ofGetWidth() , 0 , 255);
float g = ofMap(ofGetMouseY(), 0 , ofGetWidth(), 0 , 255);
float b = 100;
color.set(r,g,b);
for(int i = 0; i<512; i+=1){
dmxData[i] = r;
dmxData[i+1] = g;
dmxData[i+2] = b;
}
anNode.sendDmx("192.168.1.8", 0 , 0);
}
//--------------------------------------------------------------
void ofApp::draw(){
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key){
anNode.sendDmx("192.168.1.8" , dmxData , 512);
cout<<"DMX Message Sent"<<endl;
cout<<""<<endl;
}