cylon.js& amp;arduino uno:执行程序,而无需将电缆连接到PC [英] cylon.js & arduino uno: execute program without cable connection to PC

查看:94
本文介绍了cylon.js& amp;arduino uno:执行程序,而无需将电缆连接到PC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是这个领域的新手,所以这可能是一个奇怪的问题.我们可以在aduino IDE中编写代码(例如指示灯闪烁)并将其上传到arduino,然后我们可以断开与PC的连接,程序将运行.(会发生闪烁).现在,当我们使用cylon.js并编写程序并执行say

I am new to this field, so this might be an odd question. We can write a code(say blinking lights) in the aduino IDE and upload it to arduino and we can disconnect from the pc and the program will run. (blinking will happen). Now when we are using cylon.js and write the program and execute say

$ node blinking.js

然后,只要将arduino连接到PC(或笔记本电脑),就会发生闪烁,并且当我杀死Node js或从计算机断开arduino时,闪烁会停止.(这是应该如何发生的,对吧?)

then as long as the arduino is connected to the pc(or laptop) the blinking happens and when I kill node js or disconnect arduino from pc the blinking stops. (this is how its suppose to happen, right?)

所以我的问题是,如果我在室外某个地方有一个带有温度传感器的arduino,并且我有一个cylon.js程序来使用这些传感器数据并做一些事情(比如打印它们),那么我该如何实现呢?我必须要有两个通过无线或gsm防护板连接的arduino(一个outdor,另一个连接到运行cylon.js的PC上)吗?

So my question is, if I have a arduino with a temperature sensor some where outdoor and I have a cylon.js program to use those sensor data and do some things (say print them), then how can I achieve this ? Do I have to have two arduinos which are connected via wireless or gsm shields (one outdor and one connected to the pc where the cylon.js is running)?

还是有一种简单的方法?非常感谢对此有任何见识.

or is there a simple way of doing this? Any insight on this is much appreciated.

谢谢

推荐答案

然后,只要将arduino连接到PC(或笔记本电脑),闪烁发生,当我杀死节点js或从PC断开arduino时闪烁停止.(这是应该如何发生的,对吧?)

then as long as the arduino is connected to the pc(or laptop) the blinking happens and when I kill node js or disconnect arduino from pc the blinking stops. (this is how its suppose to happen, right?)

正确.对于任何通过CYLON.js或Johnny-Five控制Arduino的Node.js程序,都是如此.

Correct. This is true for any Node.js program controlling an Arduino, whether with Cylon.js or Johnny-Five.

如果我在室外和室外有一些带有温度传感器的arduino我有一个cylon.js程序来使用那些传感器数据并做一些事情(例如打印出来),那么我该如何实现呢?

if I have a arduino with a temperature sensor some where outdoor and I have a cylon.js program to use those sensor data and do some things (say print them), then how can I achieve this ?

使用 just Arduino开发板是不可能的.您可以使用一对Xbee模块,这将允许您的Arduino与主机通信,或者仅使用具有wifi或蓝牙功能的板,例如:

It's not possible with just an Arduino board. You can use a pair of Xbee modules, which will allow your Arduino to communicate with the host machine, or just use a board that has wifi or bluetooth capabilities, such as:

  • 火花核心
  • 电子展示
  • 英特尔Galileo
  • 英特尔爱迪生
  • Raspberry Pi
  • BeagleBone
  • pcDuino

这篇关于cylon.js& amp;arduino uno:执行程序,而无需将电缆连接到PC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆