This file contains hidden or 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
/* Measurement CO2 by S-300L-3V for Wio LTE JP Version */ | |
/* Output >> | |
Ready | |
862 | |
866 | |
871 | |
875 | |
877 | |
*/ |
This file contains hidden or 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
/* Measurement CO2 by S-300L-3V for Arduino UNO R3 */ | |
/* Output >> | |
Ready | |
862 | |
866 | |
871 | |
875 | |
877 | |
*/ |
This file contains hidden or 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
#include <WioCellLibforArduino.h> /* for Wio3G */ | |
#define CONSOLE SerialUSB | |
#include <pt.h> | |
/* PT_WAIT is very useful macro. delay() similar using. https://qiita.com/narumi18wa/items/070d3e5b2a18c4976304 */ | |
#define PT_WAIT(pt, timestamp, usec) PT_WAIT_UNTIL(pt, millis() - *timestamp > usec);*timestamp = millis(); | |
static struct pt pt1, pt2, pt3; | |
static int thread1(struct pt *pt) { | |
static unsigned long timestamp = 0; /* unit=ms; timestamp used as a ref in thread */ |
This file contains hidden or 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
[Unit] | |
Description = Emit data for Product Line demo on SORACOM Lagoon | |
[Service] | |
Type = simple | |
WorkingDirectory = /home/USERNAME/productline-demo/ | |
ExecStart = /bin/bash emit_data_a.bash | |
[Install] | |
WantedBy = default.target |
This file contains hidden or 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/bash | |
source emit_data_a.key # export D_KEY=... ; export D_SEC=... from SORACOM Inventory virtual device | |
echo "Target device is ${D_ID}" | |
trap "echo 'done.' ; exit 0" 1 2 3 15 | |
while true | |
do | |
if [ $(($RANDOM % 100)) -lt 15 ]; then |
This file contains hidden or 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
const http = require('https'); | |
module.exports = function (context, req) { | |
context.log(req); | |
const url = process.env[`WEBHOOK_URL`]; | |
const postBody = req.rawBody; | |
const options = { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
'Content-Length': Buffer.byteLength(postBody) |
This file contains hidden or 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
[Unit] | |
Description = Shooting camera client (timer) | |
[Timer] | |
OnBootSec = 1m | |
OnUnitActiveSec = 10m | |
[Install] | |
WantedBy = timers.target |
This file contains hidden or 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
[Unit] | |
Description = Shooting camera client by timer (implementation) | |
[Service] | |
Type = simple | |
ExecStart = /bin/bash /home/pi/timer_shooting.bash | |
[Install] | |
WantedBy = timer_shooting.timer |
This file contains hidden or 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/bash | |
echo "$0" | |
echo "shooting!" | nc localhost 19000 | |
echo "$0 END" | |
exit 0 |
This file contains hidden or 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
[Unit] | |
Description = Shooting camera client by GPIO6 (implementation) | |
[Service] | |
Type = simple | |
ExecStart = /bin/bash /home/pi/gpio6_shooting.bash | |
[Install] | |
WantedBy = default.target |