简体   繁体   English

Arduino + JohnnyFive-如何仅使用HTML和Web界面将.JS文件发送到Arduino

[英]Arduino + JohnnyFive - How to send a .JS file to Arduino using only HTML and a web interface

I'm new to programming and have a basic understanding of JavaScript and HTML. 我是编程新手,对JavaScript和HTML有基本的了解。

I have set up an Arduino which has StandardFirmata on it and works with JohnnyFive and Socket io to create a web interface that can control LED's and turn them on and off separately using buttons. 我设置了一个带有StandardFirmata的Arduino,并与JohnnyFive和Socket io一起创建了一个可以控制LED并使用按钮分别打开和关闭它们的Web界面。 At the moment I have to use Terminal to direct to the folder that contains the JS file and run 'node_.JS' for the Arduino and web interface to start working. 此刻,我必须使用Terminal定向到包含JS文件的文件夹,并为Arduino和Web界面运行“ node_.JS”以开始工作。

Is there a way to do this without sending commands via the terminal and for it to run the JS file by something on the web interface? 有没有一种方法可以在不通过终端发送命令的情况下通过网络界面上的某些文件来运行JS文件? I would like to only have the web interface and Arduino used as this is aimed for children. 我只想使用Web界面和Arduino,因为这是针对儿童的。

If i understand you correctly, you want to wrap you web app and node app in single "file" for easy use. 如果我正确理解您的要求,则希望将Web应用程序和节点应用程序包装在单个“文件”中,以方便使用。 Try Nwjs . 试试Nwjs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM