Search code examples
javascriptnode.jsarduinocylon.js

How to control arduino + cylon with web frontend?


Im looking for a tutorial for controlling the arduino from a web frontend. I already have a cylon/arduino program running.

Do I need api-http? I can't find any documentation on what i'm trying to do. What I want to do is lets say toggle a LED with an HTML button. I tried using the browserify tool but I got some errors. I'm not even sure If for what I want to do I need browserify. (Will post all the info if needed)

Thanks!

Note: I have experience with the MEAN stack.


Solution

  • Im answering my question because I feel that Mike Zhang's answer didn't provide enough info.

    So if you have a cylon program copy and paste that to the bottom of your node app.js

    For what I wanted to do I just used the express generator and added a link to the ejs that would toggle a variable in my routes/index which I would require in my app.js and then added an if statement to my robot code to only run if the variable is true.