Ron Dagdag
Published © GPL3+

WebUSB + Node-RED + Johnny-Five + Android = Kewlness

How about we connect an Arduino to our mobile browser, run Node-RED and Johnny-Five on the browser.

EasyProtip2 hours4,791

Things used in this project

Hardware components

Arduino Leonardo
Arduino Leonardo
×1
Elegoo Matrix MAX7219 Module
×1
ELEGOO Mega 2560 Project The Most Complete Starter Kit
×1
Android device
Android device
×1

Software apps and online services

Chirpers.com
Arduino IDE
Arduino IDE

Story

Read more

Schematics

Arduino Leonardo + MAX 7219

Fritz e9gmeijjgw

Code

Node-Red Matrix Heart

JSON
[{"id":"7057229f.6e8c8c","type":"nodebot","z":"kYQnhHw2vsw","name":"","username":"","password":"","boardType":"firmata","serialportName":"","connectionType":"webusb-serial","mqttServer":"","socketServer":"","pubTopic":"","subTopic":"","tcpHost":"","tcpPort":"","sparkId":"","sparkToken":"","beanId":"","impId":"","uuid":"","token":"","sendUuid":""},{"id":"JdKE9RvIjVQ","type":"johnny5","z":"kYQnhHw2vsw","name":"","func":" node.on('input', function (msg){\n var inject = msg.payload.heart; \n /*var heart = [\n    \"01100110\",\n    \"10011001\",\n    \"10000001\",\n    \"10000001\",\n    \"01000010\",\n    \"00100100\",\n    \"00011000\",\n    \"00000000\"\n  ];*/\n\n\n \n  var matrix = new five.Led.Matrix({\n    pins: {\n      data: 12,\n      clock: 10,\n      cs: 11\n    }\n  });\n\n  matrix.on();\n\n\n   \n  //matrix.draw(heart);\n  matrix.draw(inject);\n/*    var msg = \"johnny-five\".split(\"\");\n\n  // Display each letter for 1 second\n  function next() {\n    var c;\n\n    if (c = msg.shift()) {\n      matrix.draw(c);\n      setTimeout(next, 1000);\n    }\n  }\n\n  next();\n*/\n});","board":"7057229f.6e8c8c","noerr":0,"x":362,"y":188,"wires":[["aqu9_6FrYX0"]]}]

Standard Firmata WebUSB

Credits

Ron Dagdag

Ron Dagdag

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

Comments