How to create a connected device using Arduino + IBM Watson IoT Platform
//Flow NodeRED [{"id":"895c335a.f9ad2","type":"ibmiot in","z":"a27a8a67.3da438","authentication":"boundService","apiKey":"","inputType":"evt","deviceId":"","applicationId":"","deviceType":"+","eventType":"+","commandType":"","format":"json","name":"IBM IoT App In","service":"registered","allDevices":true,"allApplications":false,"allDeviceTypes":true,"allEvents":true,"allCommands":false,"allFormats":false,"qos":"0","x":196.5,"y":68,"wires":[["34b143e.2eb49bc","3a1abf34.5c0ce"]]},{"id":"34b143e.2eb49bc","type":"switch","z":"a27a8a67.3da438","name":"","property":"payload.d.ldr","propertyType":"msg","rules":[{"t":"lte","v":"350","vt":"str"}],"checkall":"true","outputs":1,"x":275.5,"y":148,"wires":[["6aa5ee04.72cca","a2175bcc.c81448"]]},{"id":"a2175bcc.c81448","type":"cloudant out","z":"a27a8a67.3da438","name":"","cloudant":"","database":"iot","service":"ctrafael-cloudantNoSQLDB","payonly":true,"operation":"insert","x":636.4999847412109,"y":110,"wires":[]},{"id":"d30369f.96bd598","type":"debug","z":"a27a8a67.3da438","name":"","active":true,"console":"false","complete":"payload","x":632.7708587646484,"y":172.12161254882812,"wires":[]},{"id":"6aa5ee04.72cca","type":"function","z":"a27a8a67.3da438","name":"","func":"msg.payload = {"d":{"led":'1'}};\nreturn msg;","outputs":1,"noerr":0,"x":310.5,"y":206,"wires":[["c5a519dd.35e9c8"]]},{"id":"c5a519dd.35e9c8","type":"json","z":"a27a8a67.3da438","name":"","x":442.5,"y":206,"wires":[["d30369f.96bd598","43bc6460.001b3c"]]},{"id":"3a1abf34.5c0ce","type":"debug","z":"a27a8a67.3da438","name":"payload.d","active":true,"complete":"payload.d","x":645,"y":70,"wires":[]},{"id":"43bc6460.001b3c","type":"ibmiot out","z":"a27a8a67.3da438","authentication":"boundService","apiKey":"","outputType":"cmd","deviceId":"arduinouno","deviceType":"0.13.4","eventCommandType":"alert","format":"json","data":"msg.payload","name":"IBM IoT","service":"registered","x":606,"y":323,"wires":[]}]