6bin 中文文档教程

发布于 9年前 浏览 27 项目主页 更新于 3年前

6bin

6 元素传感器用户界面。

6element 中,我们告知市民每个回收中心是否有垃圾桶。 考虑了第一种基于摄像头、图像检测和机器学习的方法,但发现它很难安装在各种回收中心。 另一种解决方案是在传感器附近安装一个屏幕,回收中心的工作人员可以用它来手动指示垃圾箱何时满了。

此屏幕可用于指示通常难以实时获取的其他信息,例如回收中心意外关闭(由于太多绑定已满、发生事故等)。

Instructions

Install

npm install
npm i tsd -g
tsd init
tsd install

Build

npm run build-dev

或者

npm run build-prod

您也可以执行

npm run watch

Run the project

npm run start

Tests

npm run test

Communication

6bin 通信协议

6bin 客户端和 6bin服务器通过 socketIO 链接。

  • Client => 'request' events => Server
  • Server => 'response' events => Client

两个动作可以触发来自客户端的“请求”事件:

  • UPDATE_BIN in the case of bin availability change
  • SET_BINS in the case of Bin list save after modifications

6bin 服务器和 6brain 通过 EventEmitter 链接。

  • Server => 'measurementRequest' and 'binsRequest' events => 6brain
  • 6brain => 'data' event => Server

6bin

6element sensors user interface.

In 6element, we inform citizens of whether bins are available for each recycling centers. A first approach based on cameras, image detection and machine learning was considered, but it was found to be too hard to install on various recycling centers. The alternative solution is to have a screen near the sensor that people working at recycling centers can use to manually indicate when a bin is full.

This screen can be used to indicate other informations that is normally hard to get in real time like unexpected recycling center closing (due to too many bind being full, an accident, etc.).

Instructions

Install

npm install
npm i tsd -g
tsd init
tsd install

Build

npm run build-dev

or

npm run build-prod

You can also do

npm run watch

Run the project

npm run start

Tests

npm run test

Communication

6bin communication protocol

6bin client and 6bin server are linked via socketIO.

  • Client => 'request' events => Server
  • Server => 'response' events => Client

Two actions can trigger 'request' events from client:

  • UPDATE_BIN in the case of bin availability change
  • SET_BINS in the case of Bin list save after modifications

6bin server and 6brain are linked via EventEmitter.

  • Server => 'measurementRequest' and 'binsRequest' events => 6brain
  • 6brain => 'data' event => Server
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文