View AWS Summit Tokyo 2023 A.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import urllib.request | |
import urllib.parse | |
SLACK_CHANNEL_ID = os.environ['SLACK_CHANNEL_ID'] | |
def lambda_handler(event, _): | |
print(f'{event=}') | |
btn = event['deviceEvent']['buttonClicked']['clickType'] | |
text = f'ボタンが「{btn}」で押されました。<@UC0RVEWBZ> 仕組み: https://ma2shita.s3.ap-northeast-1.amazonaws.com/awssummittokyo2023a/AWS+Summit+Tokyo+2023.png' |
View export_images.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using: | |
# bash export_images.bash 7CxxxxxxxxCF "2022/10/18 7:00:00" [LOOP_COUNT:19] | |
# #=> 001.jpg(+2:00) ~ 019.jpg(+38:00) | |
# Copyright (c) 2022 Kohei "Max" MATSUSHITA (ma2shita+git@ma2shita.jp) | |
# Released under the MIT license | |
# https://opensource.org/licenses/mit-license.php | |
DEVICE_ID=$1 | |
START_DATETIME=$2 |
View export_images.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using: | |
# .\export_images.ps1 7CxxxxxxxxCF "2022/10/18 7:00:00" [LOOP_COUNT:19] -Verbose | |
# #=> 001.jpg(+2:00) ~ 019.jpg(+38:00) | |
# Copyright (c) 2022 Kohei "Max" MATSUSHITA (ma2shita+git@ma2shita.jp) | |
# Released under the MIT license | |
# https://opensource.org/licenses/mit-license.php | |
[CmdletBinding()] | |
Param( |
View rrcf-demo-run.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2022 Kohei "Max" MATSUSHITA (ma2shita+git@ma2shita.jp) | |
# Released under the MIT license | |
# https://opensource.org/licenses/mit-license.php | |
import sys | |
# Params for sin() | |
hz = 1.0 | |
length_sec = 4.1 | |
sampling_frequency = 10 | |
# Generate |
View m5stack_deviceshadow_3gextboard_soracombeam_example.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Example | AWS IoT Core's Device shadow implementation using SORACOM Beam on M5Stack Basic/Gray + 3G ext. board | |
Copyright (c) 2022 Kohei "Max" MATSUSHITA (ma2shita+git@ma2shita.jp) | |
Released under the MIT license | |
https://opensource.org/licenses/mit-license.php | |
*/ | |
#define _VERSION_ "0.9" | |
#define THING_NAME "mcu1" | |
#define SHADOW_NAME "peripheral" |
View keigan_motor_control_by_mqtt_sub.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2021 Kohei "Max" MATSUSHITA (ma2shita+git@ma2shita.jp) | |
* Released under the MIT license | |
* https://opensource.org/licenses/mit-license.php | |
*/ | |
#define __VERSION__ "0.999" | |
#define SerialMon SerialUSB | |
#define LOOP_INTERVAL_MS 100 |
View Arducam_B0176_focus_ctl.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
""" | |
Focus control for Arducam B0176 "Motorized focus camera for Raspberry Pi" | |
See: TBC | |
Copyright (c) 2021 Kohei MATSUSHITA | |
This software is released under the The 3-Clause BSD License. |
View ATECC608A_shell.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: | |
$ cd Core2-for-AWS-IoT-EduKit/Blinky-Hello-World/ | |
$ curl -O ATECC608A_shell.py | |
$ source ~/esp/esp-idf/export.sh | |
$ PYTHONSTARTUP=ATECC608A_shell.py python | |
""" | |
port = "/dev/ttyUSB0" |
View WioLTE_KeiganMotor_MQTT_ctrl.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2021 Kohei "Max" MATSUSHITA (ma2shita+git@ma2shita.jp) | |
* Released under the MIT license | |
* https://opensource.org/licenses/mit-license.php | |
*/ | |
#define __VERSION__ "0.999" | |
#define SerialMon SerialUSB | |
#define LOOP_INTERVAL_MS (100) |
View lagoon_template_for_ambient_monitor_using_arduino.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
NewerOlder