Skip to content

Instantly share code, notes, and snippets.

@kou029w
kou029w / tottori-iot.netlify.com 設定例抜粋.md
Last active February 6, 2020 09:14
tottori-iot.netlify.com 設定例抜粋

条件

パラメーター 条件式 動作
騒音 70 <= soundNoise && soundNoise < 90 GPIO 20 が一定回数 High/Low の出力を繰り返す
騒音 90 <= soundNoise GPIO 26 が一定回数 High/Low の出力を繰り返す
温度 26 <= temperature 温度${temperature}度です と読み上げる
相対湿度 50 <= relativeHumidity 湿度${relativeHumidity}パーセントです と読み上げる
VOC 100 <= eTVOC 総揮発性有機化合物濃度${eTVOC}ppbです と読み上げる
@kou029w
kou029w / README.md
Last active January 30, 2020 09:02
湿度が40%以下のときLEDを点滅させる tottori-iot.netlify.com 設定例抜粋

湿度が40%以下のときLEDを点滅させる: あらかじめLEDをRaspberry PiのGPIO26 (BCM)とGNDに接続する

GPIO26---|>|---[100-470 Ohm]---GND

回路図

tottori-iot.netlify.com 設定例

@kou029w
kou029w / config.part.js
Created January 14, 2020 11:23
tottori-iot.netlify.com 設定例抜粋
speechAgent: {
enable: true,
notifyWhen: () => {
const hours = new Date().getHours();
return 7 <= hours && hours < 19;
},
notifyScript: ({ temperature, eTVOC }) => {
return [
temperature <= 18 ? "暖房を入れましょう" : null,
28 <= temperature ? "暖房を切りましょう" : null,
@kou029w
kou029w / README.md
Last active November 3, 2019 01:19
ads1x15 example

Usage

npm i
node index.js
HISTSIZE=1000000
HISTFILESIZE=2000000
PROMPT_COMMAND='[[ $_PWD == $PWD ]] || { _PWD=$PWD; ls; }'
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " \[\033[32m\](%s)\[\033[00m\]")\n\$ '
shopt -s autocd
@kou029w
kou029w / colaboratory.ipynb
Last active November 8, 2018 09:13
Colaboratoryで感情-音声データセット使った感情解析をやってみた
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.