Ron Dagdag
Published © GPL3+

Things I can do with ARTIK 5

Getting Started Guide to Samsung Artik 5 beta board: Using NodeJS, Node-Red, GPIO pins, Text-To-Speech, connecting to Twitter and IFTTT.

IntermediateProtip2,329
Things I can do with ARTIK 5

Things used in this project

Hardware components

ARTIK 5
Samsung ARTIK 5
×1
Seeed Studio Grove Arduino Kit
×1
speakers
×1
Android Wear
×1

Software apps and online services

Maker service
IFTTT Maker service
Twitter
Twitter

Story

Read more

Schematics

Grove Arduino Shield

Grove Arduino Shield with LED and Rotary Angle

Code

Node-Red Code

JavaScript
Node-Red
[{"id":"47447010.b8bb9","type":"http request","z":"6e8e18c6.9171e8","name":"","method":"POST","ret":"txt","url":"https://maker.ifttt.com/trigger/message_tweet/with/key/","x":741.5,"y":488,"wires":[["ed8705ed.1278f8"]]},{"id":"1d114875.e2eeb8","type":"inject","z":"6e8e18c6.9171e8","name":"Trigger","topic":"","payload":"true","payloadType":"bool","repeat":"1","crontab":"","once":false,"x":115.5,"y":126,"wires":[["9372327.f6c8dd"]]},{"id":"fbc235c4.043dc8","type":"exec","z":"6e8e18c6.9171e8","command":"echo 1 > /sys/class/gpio/gpio121/value","addpay":false,"append":"","useSpawn":"","name":"On","x":578.5,"y":258.5,"wires":[[],[],[]]},{"id":"290490e4.d6fb7","type":"exec","z":"6e8e18c6.9171e8","command":"echo 0 > /sys/class/gpio/gpio121/value","addpay":false,"append":"","useSpawn":"","name":"Off","x":700.5,"y":377.5,"wires":[[],[],[]]},{"id":"229204d9.dd6dfc","type":"inject","z":"6e8e18c6.9171e8","name":"Turn Off LED","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":313.5,"y":347,"wires":[["290490e4.d6fb7"]]},{"id":"9372327.f6c8dd","type":"file in","z":"6e8e18c6.9171e8","name":"A0","filename":"/sys/devices/126c0000.adc/iio:device0/in_voltage0_raw","format":"utf8","x":171.5,"y":186,"wires":[["fcd38612.032c78","5a64f55d.a59b0c"]]},{"id":"fcd38612.032c78","type":"function","z":"6e8e18c6.9171e8","name":"On","func":"var num = msg.payload.replace(\"\\n\", \"\");\n//console.log(num);\nif (msg.payload > 1000) {\n   return [ msg, null ];\n} else {\n   return [ null, msg ];\n}","outputs":"2","noerr":0,"x":343.5,"y":200,"wires":[["fbc235c4.043dc8","b7403874.48bfc8"],["290490e4.d6fb7","148674e8.eb798b"]]},{"id":"5a64f55d.a59b0c","type":"debug","z":"6e8e18c6.9171e8","name":"A0 Contents","active":true,"console":"false","complete":"payload","x":366.5,"y":150,"wires":[]},{"id":"148674e8.eb798b","type":"debug","z":"6e8e18c6.9171e8","name":"Off Log","active":true,"console":"false","complete":"payload","x":591.5,"y":314,"wires":[]},{"id":"b7403874.48bfc8","type":"debug","z":"6e8e18c6.9171e8","name":"On Log","active":true,"console":"false","complete":"payload","x":586.5,"y":208,"wires":[]},{"id":"abf350ee.540cb","type":"inject","z":"6e8e18c6.9171e8","name":"Turn On LED","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":330.5,"y":298,"wires":[["fbc235c4.043dc8"]]},{"id":"9b43a6d1.64bc58","type":"inject","z":"6e8e18c6.9171e8","name":"Initalization","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":126.5,"y":52,"wires":[["3799b726.c86648"]]},{"id":"3799b726.c86648","type":"exec","z":"6e8e18c6.9171e8","command":"echo 121 > /sys/class/gpio/export;echo out > /sys/class/gpio/gpio121/direction","addpay":false,"append":"","useSpawn":"","name":"Initializing","x":341.5,"y":52.5,"wires":[["4c6cd0ed.b3933"],["4c6cd0ed.b3933"],["4c6cd0ed.b3933"]]},{"id":"4c6cd0ed.b3933","type":"debug","z":"6e8e18c6.9171e8","name":"Result","active":true,"console":"false","complete":"payload","x":518.5,"y":46,"wires":[]},{"id":"7bda491.f8425b8","type":"file in","z":"6e8e18c6.9171e8","name":"A1","filename":"/sys/devices/126c0000.adc/iio:device0/in_voltage1_raw","format":"utf8","x":155,"y":247,"wires":[["fcd38612.032c78","2edbc0bf.d1244"]]},{"id":"2edbc0bf.d1244","type":"debug","z":"6e8e18c6.9171e8","name":"A0 Contents","active":true,"console":"false","complete":"payload","x":345,"y":255,"wires":[]},{"id":"7b0da857.84f258","type":"inject","z":"6e8e18c6.9171e8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":105.5,"y":318,"wires":[["7bda491.f8425b8"]]},{"id":"a741326c.58bed","type":"twitter in","z":"6e8e18c6.9171e8","twitter":"","tags":"","user":"dm","name":"my messages","topic":"tweets","x":216.5,"y":408,"wires":[["f36b4025.0c94c","d2ca572.f2d35a8","fbc235c4.043dc8","d8d5685c.272a98"]]},{"id":"f36b4025.0c94c","type":"exec","z":"6e8e18c6.9171e8","command":"espeak","addpay":true,"append":"","useSpawn":"","name":"speak","x":447.5,"y":479.5,"wires":[["290490e4.d6fb7"],[],[]]},{"id":"cd9477d8.326b88","type":"inject","z":"6e8e18c6.9171e8","name":"","topic":"","payload":"\"hello Artik\"","payloadType":"str","repeat":"","crontab":"","once":false,"x":209.5,"y":477,"wires":[["f36b4025.0c94c","fbc235c4.043dc8","d8d5685c.272a98"]]},{"id":"d2ca572.f2d35a8","type":"debug","z":"6e8e18c6.9171e8","name":"Message Content","active":true,"console":"false","complete":"payload","x":483.5,"y":420,"wires":[]},{"id":"d8d5685c.272a98","type":"function","z":"6e8e18c6.9171e8","name":"make body of http request","func":"var newMsg = { payload: { \"value1\": msg.topic, \"value2\": msg.payload } };\nreturn newMsg;","outputs":1,"noerr":0,"x":472.5,"y":551,"wires":[["25ef16fe.da10ea","47447010.b8bb9"]]},{"id":"25ef16fe.da10ea","type":"debug","z":"6e8e18c6.9171e8","name":"","active":true,"console":"false","complete":"payload","x":728.5,"y":545,"wires":[]},{"id":"ed8705ed.1278f8","type":"http response","z":"6e8e18c6.9171e8","name":"","x":913.5,"y":485,"wires":[]}]

Credits

Ron Dagdag

Ron Dagdag

47 projects • 436 followers
Microsoft MVP award / Lead Software Engineer / Augmented Reality. Developer Passionate to learn about Robotics, VR, AR, ML, IOT

Comments