cylon.js &arduino uno:在没有电缆连接到 PC 的情况下执行程序 [英] cylon.js & arduino uno: execute program without cable connection to PC

查看:20
本文介绍了cylon.js &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(或笔记本电脑),就会发生闪烁,当我杀死节点 js 或断开 arduino 与 pc 的连接时,闪烁就会停止.(这就是它假设发生的方式,对吗?)

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(一个在室外,一个连接到运行 cylon.js 的电脑)?

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 连接到个人电脑(或笔记本电脑)闪烁发生,当我杀死节点 js 或断开 arduino 与 pc 的连接时闪烁停止.(这就是它假设发生的方式,对吗?)

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 的 Node.js 程序来说都是如此,无论是使用 Cylon.js 还是 Johnny-Five.

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 ?

一个 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:

  • 火花核心
  • 电动进口
  • 英特尔伽利略
  • 英特尔爱迪生
  • 树莓派
  • BeagleBone
  • pcDuino

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

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