- Grove SGP30(CO2ノードの近似値を取得するため)
- Grove Temperature&Humidity Sensor(温度・湿度の取得)
- reTurminal
- Grove Base HAT for Raspberry Pi
温湿度センサーはGrove Base HAT上のPWMポートに接続する。
#!/bin/bash | |
# Install ROS melodic on Raspberry Pi OS Buster | |
# Ref: http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Melodic%20on%20the%20Raspberry%20Pi | |
echo "Start Install" | |
# Setup ROS Repositories to source list | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - |
#!/bin/bash | |
rotation=$(xrandr -q --verbose|grep DSI-1|egrep -o "(normal|left)"|head -1) | |
if [ "$rotation" = "normal" ];then | |
xrandr --output DSI-1 --rotate left | |
else | |
xrandr --output DSI-1 --rotate normal | |
fi |
import os | |
import json | |
import boto3 | |
import urllib3 | |
http = urllib3.PoolManager() | |
class LineBotApi(object): | |
def __init__(self, access_token): | |
self.access_token = access_token |
#! /usr/bin/env python3 | |
import seeed_dht | |
import requests | |
from datetime import datetime | |
ACCESS_TOKEN = 'YOUR_TOKEN' | |
def call_api(message): | |
header = {'Authorization': 'Bearer {}'.format(ACCESS_TOKEN)} | |
payload = {'message':message} |
#!/bin/bash | |
# Install ros kinetic on raspian buster | |
# Ref: http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Kinetic%20on%20the%20Raspberry%20Pi | |
# Setup ROS Repositories | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 | |
sudo apt-get update |
name | age | |
---|---|---|
Taro | 24 | |
Ken | 21 | |
Ichiro | 32 |
電気をつけて | LEDをつける | |
---|---|---|
LEDをつけて | LEDをつける | |
スイッチを入れて | LEDをつける | |
スイッチを消して | LEDを消す | |
LEDを消して | LEDを消す | |
電気を消して | LEDを消す |
# | |
# | |
# main() will be run when you invoke this action | |
# | |
# @param Cloud Functions actions accept a single parameter, which must be a JSON object. | |
# | |
# @return The output of this action, which must be a JSON object. | |
# | |
# | |
import sys |