NANO Subscriber
Published

GlobLED

Clever Globus where main source of light are LED's. All of them are changable and fully programable. It has thermometer and button for start

IntermediateWork in progress2 hours106
GlobLED

Things used in this project

Hardware components

Radio Dongle
HARDWARIO Radio Dongle
×1
LED Strip RGBW 1m 144 LEDs
HARDWARIO LED Strip RGBW 1m 144 LEDs
×1
Power Controller Kit
HARDWARIO Power Controller Kit
×1
Push Button Kit
HARDWARIO Push Button Kit
×1

Software apps and online services

Playground
HARDWARIO Playground
Blynk
Blynk

Story

Read more

Custom parts and enclosures

Complet Set

Schematics

GlobLED - Block Schematic

Code

GlobLED

C Header File
[{"id":"cdb13220.fb1cf","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"2fca2090.bda2e","type":"mqtt out","z":"cdb13220.fb1cf","name":"","topic":"node/power-controller:0/led-strip/-/effect/set","qos":"","retain":"","broker":"ca212796.02d8d8","x":1050,"y":440,"wires":[]},{"id":"53dd836d.1a0f8c","type":"change","z":"cdb13220.fb1cf","name":"Effects without specific color","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"{\"type\":\"rainbow\", \"wait\":20}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"2","fromt":"num","to":"{\"type\":\"rainbow-cycle\",\"wait\":20}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"3","fromt":"num","to":"{\"type\":\"theater-chase-rainbow\",\"wait\":0}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":420,"wires":[["2fca2090.bda2e"]]},{"id":"262412b5.40fa7e","type":"mqtt in","z":"cdb13220.fb1cf","name":"","topic":"node/push-button:0/orientation","qos":"2","broker":"ca212796.02d8d8","x":120,"y":440,"wires":[["5178ca45.611d74"]]},{"id":"48292f44.f1fbc","type":"mqtt in","z":"cdb13220.fb1cf","name":"","topic":"node/push-button:0/push-button/-/event-count","qos":"2","broker":"ca212796.02d8d8","x":160,"y":520,"wires":[["3b1eaefd.fbab62"]]},{"id":"3b1eaefd.fbab62","type":"function","z":"cdb13220.fb1cf","name":"brightness adjust","func":"var brightness = flow.get(\"brightness\") || 0;\nbrightness += 10;\nif(brightness > 100)\n{\n    brightness = 0;\n    flow.set(\"brightness\", 0);\n}\nmsg.payload = brightness;\nflow.set(\"brightness\", brightness);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":520,"wires":[["b02dd186.84a58"]]},{"id":"b02dd186.84a58","type":"mqtt out","z":"cdb13220.fb1cf","name":"","topic":"node/power-controller:0/led-strip/-/brightness/set","qos":"","retain":"","broker":"ca212796.02d8d8","x":820,"y":520,"wires":[]},{"id":"75993ffd.de712","type":"mqtt in","z":"cdb13220.fb1cf","name":"","topic":"node/push-button:0/push-button/-/hold-count","qos":"2","broker":"ca212796.02d8d8","x":170,"y":600,"wires":[["a0a968ca.9b1f78"]]},{"id":"a0a968ca.9b1f78","type":"function","z":"cdb13220.fb1cf","name":"color swap","func":"var colors = [0x0000ff, 0xff0000, 0xffff00, 0x00ff00, 0xff1493, 0xffffff, 0xff4500, 0x800080, 0x8B4513];\nvar index = Math.floor(Math.random(colors.length) * 10);\n\nvar color = colors[index].toString(16);\n\n\n\nvar zeros = \"\";\nif(color.length != 6)\n{\n    for(var i = 0; i < 6 - color.length; i++)\n    {\n        zeros += \"0\";\n    }\n}\n\ncolor = zeros + color;\nflow.set(\"color\", color);\n\nmsg.payload = \"\\\"#\";\n\nmsg.payload += color + \"(00)\";\n\nmsg.payload += \"\\\"\";\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":600,"wires":[["d388d00d.9e524"]]},{"id":"d388d00d.9e524","type":"mqtt out","z":"cdb13220.fb1cf","name":"","topic":"node/power-controller:0/led-strip/-/color/set","qos":"","retain":"","broker":"ca212796.02d8d8","x":810,"y":600,"wires":[]},{"id":"5178ca45.611d74","type":"switch","z":"cdb13220.fb1cf","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"6","vt":"num"}],"checkall":"false","repair":false,"outputs":6,"x":310,"y":440,"wires":[["53dd836d.1a0f8c"],["53dd836d.1a0f8c"],["53dd836d.1a0f8c"],["986e9210.d275b"],["986e9210.d275b"],["986e9210.d275b"]]},{"id":"5486edad.98e624","type":"json","z":"cdb13220.fb1cf","name":"","property":"payload","action":"obj","pretty":false,"x":870,"y":340,"wires":[["2fca2090.bda2e"]]},{"id":"c4dd4582.81e3b8","type":"function","z":"cdb13220.fb1cf","name":"color parse","func":"var color = flow.get(\"color\") || 0xff0000;\nmsg.payload += \"#\" + color + \"\\\"}\";\nreturn msg;","outputs":1,"noerr":0,"x":730,"y":340,"wires":[["5486edad.98e624"]]},{"id":"986e9210.d275b","type":"change","z":"cdb13220.fb1cf","name":"Effects with specific color","rules":[{"t":"change","p":"payload","pt":"msg","from":"4","fromt":"num","to":"{\"type\":\"icicle\", \"wait\":80, \"color\":\"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"5","fromt":"num","to":"{\"type\":\"pulse-color\", \"wait\":80, \"color\":\"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"6","fromt":"num","to":"{\"type\":\"color-wipe\", \"wait\":50, \"color\":\"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":340,"wires":[["c4dd4582.81e3b8"]]},{"id":"c03875d7.33da48","type":"ui_gauge","z":"cdb13220.fb1cf","name":"","group":"57ff470b.93fdf8","order":4,"width":0,"height":0,"gtype":"gage","title":"Jas","label":"%","format":"{{value}}%","min":0,"max":"100","colors":["#6d6d6d","#6d6d6d","#6d6d6d"],"seg1":"","seg2":"","x":950,"y":700,"wires":[]},{"id":"a35ccc7a.bafeb","type":"blynk-ws-out-write","z":"cdb13220.fb1cf","name":"","pin":"1","pinmode":0,"client":"fb79fad7.608e98","x":980,"y":740,"wires":[]},{"id":"467db50b.d69c8c","type":"mqtt in","z":"cdb13220.fb1cf","name":"","topic":"node/power-controller:0/led-strip/-/brightness/set","qos":"2","datatype":"auto","broker":"29fba84a.b2af58","x":480,"y":720,"wires":[["c03875d7.33da48","a35ccc7a.bafeb"]]},{"id":"ca212796.02d8d8","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"57ff470b.93fdf8","type":"ui_group","z":"","name":"Default","tab":"11207769.c31889","order":1,"disp":true,"width":"6","collapse":false},{"id":"fb79fad7.608e98","type":"blynk-ws-client","z":"","name":"","path":"ws://blynk-cloud.com/websockets","key":"Ww2gLQ7_RT1gFIBERBmtmZagLwrnin8k","dbg_all":false,"dbg_read":false,"dbg_write":false,"dbg_notify":false,"dbg_mail":false,"dbg_prop":false,"dbg_sync":false,"dbg_bridge":false,"dbg_low":false,"dbg_pins":"","multi_cmd":true,"proxy_type":"no","proxy_url":"","enabled":true},{"id":"29fba84a.b2af58","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":" node/power-controller:0/led-strip/-/brightness/set","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"11207769.c31889","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Credits

NANO Subscriber

NANO Subscriber

1 project • 0 followers

Comments

Add projectSign up / Login