简体   繁体   English

node.js 帮助创建无声门铃

[英]node.js help for creating a silent doorbell

I'm not a coder (just wanted to get that out there).我不是编码员(只是想把它弄出来)。 I read an article about creating a silent doorbell (I have a dog that's insane).我读了一篇关于创建无声门铃的文章(我有一只疯狗)。

https://github.com/initialstate/silent-doorbell/wiki/Part-2.-Finding-the-Button 's-Address https://github.com/initialstate/silent-doorbell/wiki/Part-2.-Finding-the-Button的地址

I'm relatively computer literate.我比较懂电脑。 I followed the instructions for windows and download node.js.我按照 windows 的说明下载了 node.js。 The instructions say to open a node.js command prompt and put in the following command:说明说打开 node.js 命令提示符并输入以下命令:

sudo apt-get install npm须藤 apt-get 安装 npm

sudo apt-get install libpcap-dev须藤 apt-get 安装 libpcap-dev

npm install node-dash-button npm install node-dash-button

the problem i'm having is 1) I'm getting an error saying "apt-get" is not recognized as an internal or external command operable program or batch file.我遇到的问题是 1) 我收到一条错误消息,提示“apt-get”未被识别为内部或外部命令可操作程序或批处理文件。

Reiterating that I am no nowhere near as sophisticated as the users i've seen on here and am just a guy trying to keep the baby sleeping b/c the dog can't shut up - is anyone able to help so I can then go to the next step of instructions?重申我远没有我在这里看到的用户那么老练,我只是一个试图让婴儿睡觉 b/c 狗不能闭嘴的人 - 有没有人可以提供帮助,所以我可以去下一步的指示?

Thanks so much in advance.非常感谢。

Brad布拉德

sudo apt-get is a linux packet manage, so you wouldn't want to do this on windows. sudo apt-get 是一个 linux 数据包管理器,所以你不会想在 Windows 上这样做。 As they have mentioned raspberry-pi's I gather that they have made the assumption that you would be on linux.正如他们提到的 raspberry-pi,我认为他们已经假设您将使用 linux。

If you ran that command in a linux terminal it would install the preqequisites and then install node-dash-button in node.如果您在 linux 终端中运行该命令,它将安装 preqequisites,然后在 node.js 中安装 node-dash-button。

Try just running the nodejs packet manager part:尝试只运行 nodejs 数据包管理器部分:

npm install node-dash-button npm install node-dash-button

The rest of that line is not node or windows.该行的其余部分不是节点或窗口。

Hopefully this will get you to the next stage :)希望这能让你进入下一阶段:)

The whole tutorial asumes you being on a Linux/Unix system.整个教程假设您使用的是 Linux/Unix 系统。

If you solve this issue you will run into the next if you don't know what the commands mean and how to translate them to windows.如果您解决了这个问题,如果您不知道这些命令的含义以及如何将它们转换为 Windows,您将遇到下一个问题。

For example例如

sudo node bin/findbutton

is a linux/unix command as well (which is the next step in your tutorial).也是一个 linux/unix 命令(这是教程的下一步)。 So i strongly suggest setting up a VM with linux (debian should do).所以我强烈建议用 linux 设置一个 VM(debian 应该这样做)。

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

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