cylon.js&安培; Arduino的UNO:无电缆连接到电脑执行程序 [英] cylon.js & arduino uno: execute program without cable connection to PC

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

问题描述

我是新来这个领域,所以这可能是一个奇怪的问题。
我们可以写一个code(说的指示灯闪烁)在aduino IDE并上传到Arduino的,我们可以从PC上断开,程序就会运行。 (闪烁会发生)。
现在,当我们使用cylon.js和编写程序并执行说

  $节点blinking.js

然后只要Arduino是连接到PC或笔记本电脑的闪烁情况,当我杀了节点JS或从PC上断开的Arduino停止闪烁。 (这是它怎么想发生的,对吧?)

所以我的问题是,
如果我有一个温度传感器的Arduino的一些地方的户外,我有一个cylon.js程序使用这些传感器数据,并做一些事情(比如打印出来),那么我怎么能做到这一点?我必须有,它们通过无线或GSM屏蔽连接的两个arduinos(一个outdor和一个接入到cylon.js运行PC)?

还是有这样做的一个简单的方法?在这个任何见解是非常AP preciated。

感谢您


解决方案

  

然后只要Arduino是连接到PC(或笔记本电脑)的
  闪烁的情况发生时,我杀了节点JS或从PC上断开的Arduino
  停止闪烁。 (这是它怎么想发生的,对吧?)


正确的。这对于任何Node.js的程序控制一个Arduino,无论是Cylon.js或约翰尼五是真实的。


  

如果我有一个温度传感器的Arduino一些地方和户外
  我有一个cylon.js程序使用这些传感器数据,并做一些事情
  (比方说打印出来),那么我怎么能做到这一点?


这是不可能的的只是的一个Arduino板。你可以用一对的XBee模块,这将让你的Arduino与主机通讯,或者只是使用具有WiFi或蓝牙功能,如板:


  • 星火核心

  • 电动进出口

  • 英特尔伽利略

  • 英特尔爱迪生

  • 树莓派

  • BeagleBone

  • pcDuino

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

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?)

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.

Thank you

解决方案

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?)

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

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 ?

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:

  • Spark Core
  • Electric Imp
  • Intel Galileo
  • Intel Edison
  • Raspberry Pi
  • BeagleBone
  • pcDuino

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

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