{"action":"created","issue":{"url":"https://api.github.com/repos/kitesurfer1404/WS2812FX/issues/75","repository_url":"https://api.github.com/repos/kitesurfer1404/WS2812FX","labels_url":"https://api.github.com/repos/kitesurfer1404/WS2812FX/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/kitesurfer1404/WS2812FX/issues/75/comments","events_url":"https://api.github.com/repos/kitesurfer1404/WS2812FX/issues/75/events","html_url":"https://github.com/kitesurfer1404/WS2812FX/issues/75","id":298469568,"number":75,"title":"OSC trigger different effetcs","user":{"login":"leexorsist","id":36601603,"avatar_url":"https://avatars0.githubusercontent.com/u/36601603?v=4","gravatar_id":"","url":"https://api.github.com/users/leexorsist","html_url":"https://github.com/leexorsist","followers_url":"https://api.github.com/users/leexorsist/followers","following_url":"https://api.github.com/users/leexorsist/following{/other_user}","gists_url":"https://api.github.com/users/leexorsist/gists{/gist_id}","starred_url":"https://api.github.com/users/leexorsist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leexorsist/subscriptions","organizations_url":"https://api.github.com/users/leexorsist/orgs","repos_url":"https://api.github.com/users/leexorsist/repos","events_url":"https://api.github.com/users/leexorsist/events{/privacy}","received_events_url":"https://api.github.com/users/leexorsist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-20T04:37:49Z","updated_at":"2018-02-25T18:56:43Z","closed_at":null,"author_association":"NONE","body":"Hello, im making a project whit osc touch and neopixels in  a nodemcu V3, \r\nmi question is : \r\n\r\n how  can i trigger diferent effects whit a diferent osc adress in each one?\r\n\r\nthe code is running pretty good but i only work whit one effect, (the main declared in setMode) \r\n\r\ni cant find where or how put the different efeccts, because i want it an especific adress react with especific effect.\r\n\r\nany ideas?\r\nthanks for any help!\r\n\r\n`#include <WS2812FX.h>\r\n#include <Adafruit_NeoPixel.h>\r\n#include <ESP8266WiFi.h>\r\n#include <OSCBundle.h>  \r\n#include <WiFiUdp.h>\r\n\r\n#define LED_COUNT 9\r\n#define LED_PIN 15\r\n\r\n\r\n\r\nchar ssid[] = \"-----------\";                 // your network SSID (name)\r\nchar pass[] = \"-----------\";  \r\n\r\nWiFiUDP Udp;                          \r\nconst unsigned int localPort = 8005;  \r\nconst unsigned int destPort = 9005;\r\n\r\n\r\n\r\nbool oldState = HIGH;\r\n\r\nWS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);\r\n\r\n\r\nunsigned long last_trigger = 0;\r\nunsigned long now = 0;\r\n\r\nvoid setup() {\r\n\r\n   Serial.begin(115200);\r\n    Serial.println();\r\n    Serial.print(\"Connecting to \");\r\n    Serial.println(ssid);\r\n    WiFi.begin(ssid, pass);\r\n    while (WiFi.status() != WL_CONNECTED) {\r\n        delay(500);\r\n        Serial.print(\".\");\r\n    }\r\n Serial.println(\"\");\r\n    Serial.println(\"WiFi connected\");\r\n    Serial.println(\"IP address: \");\r\n    Serial.println(WiFi.localIP());\r\n    Serial.println(\"Starting UDP\");\r\n    Udp.begin(localPort);\r\n    Serial.print(\"Local port: \");\r\n    Serial.println(Udp.localPort());\r\n\r\n\r\n  ws2812fx.init();\r\n  ws2812fx.setBrightness(50);\r\n  ws2812fx.setMode(FX_MODE_BLINK);\r\n\r\n  \r\n  \r\n  // put your setup code here, to run once:\r\n\r\n}\r\n\r\nvoid loop() {\r\n\r\n  ws2812fx.service();\r\n  \r\n  OSCMessage msgIN;\r\n  int size;\r\n  if((size = Udp.parsePacket())>0){\r\n    while(size--)\r\n      msgIN.fill(Udp.read());\r\n    if(!msgIN.hasError()){\r\n      msgIN.route(\"/1/toggleLED\", osc1);  \r\n    }\r\n  }\r\n}\r\n\r\n void osc1 (OSCMessage &msg, int addrOffset){     //////1er msg\r\n  oldState = (boolean) msg.getFloat(0);\r\n  if(msg. isFloat ( 0 )) {\r\n  ws2812fx.trigger();\r\n  OSCMessage msgOUT(\"/1/toggleLED\");\r\n  msgOUT.add(oldState);\r\n  \r\n  \r\n       if (oldState) {\r\n    Serial.println(\"LED on\");\r\n  }  \r\n \r\n  else {\r\n    Serial.println(\"LED off\");\r\n  }\r\n  \r\n oldState = !oldState; \r\n\r\n  \r\n Udp.beginPacket(Udp.remoteIP(), destPort);\r\n msgOUT.send(Udp); // send the bytes\r\n Udp.endPacket(); // mark the end of the OSC Packet\r\n msgOUT.empty(); // free space occupied by message\r\n  }\r\n  }`"},"comment":{"url":"https://api.github.com/repos/kitesurfer1404/WS2812FX/issues/comments/368334550","html_url":"https://github.com/kitesurfer1404/WS2812FX/issues/75#issuecomment-368334550","issue_url":"https://api.github.com/repos/kitesurfer1404/WS2812FX/issues/75","id":368334550,"user":{"login":"moose4lord","id":15672113,"avatar_url":"https://avatars3.githubusercontent.com/u/15672113?v=4","gravatar_id":"","url":"https://api.github.com/users/moose4lord","html_url":"https://github.com/moose4lord","followers_url":"https://api.github.com/users/moose4lord/followers","following_url":"https://api.github.com/users/moose4lord/following{/other_user}","gists_url":"https://api.github.com/users/moose4lord/gists{/gist_id}","starred_url":"https://api.github.com/users/moose4lord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moose4lord/subscriptions","organizations_url":"https://api.github.com/users/moose4lord/orgs","repos_url":"https://api.github.com/users/moose4lord/repos","events_url":"https://api.github.com/users/moose4lord/events{/privacy}","received_events_url":"https://api.github.com/users/moose4lord/received_events","type":"User","site_admin":false},"created_at":"2018-02-25T18:56:43Z","updated_at":"2018-02-25T18:56:43Z","author_association":"CONTRIBUTOR","body":"You forgot to call ws2812fx.start() in your setup() function. That starts the animation.\r\n"}}
{"actor":{"display_login":"moose4lord"}}