Instantly share code, notes, and snippets.

View awsiotcore-deviceshadow_via_soracom-beam.ino
/*
* Copyright (c) 2019 Kohei "Max" MATSUSHITA
* Released under the MIT license
* https://opensource.org/licenses/mit-license.php
*/
#include <string.h>
#include <stdio.h>
#include <WioLTEforArduino.h>
WioLTE Wio;
#include <WioLTEClient.h>
View call_monitor.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Call monitor</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aws-sdk/2.347.0/aws-sdk.min.js" integrity="sha256-qtb6+nTMZW+JYwXLuTMqyH0IqYhYJn5HTdkBoFOZZ90="
crossorigin="anonymous"></script>
View max1click-demo_JF2018_call.py
"""
required ENVs;
- INCOMING_WEBHOOK: Slack's Incoming Webhook URL
- PARSON_(SINGLE|DOUBLE|LONG): JSONfy String
{"name": <Display name and Thing name:String>,
"slack_id": <Slack member ID (see profile):String>}
e.g.) {"name":"max","slack_id":"UC0RVEWBZ"}
"""
import json
View max1click-demo_JF2018_transiton_to_idle.py
"""
`event` is;
{
"transition_wating_sec": <sec:Integer>,
"thing_name": <thingName:String>
}
"""
import json
import logging
View max1click-demo_JF2018_response.py
"""
INPUT: API Gateway
required ENVs;
- OUTGOING_TOKEN: Slack's Outgoing Webhook Token
"""
import json
import logging
logger = logging.getLogger()
View multiple_DHT11_on_wiolte.ino
/* TemperatureAndHumidity Class for DHT11 ==== */
class TemperatureAndHumidity
{
public:
TemperatureAndHumidity(int pin);
bool Read(float* temperature, float* humidity);
private:
int _pin;
void DHT11Init(int pin);
void DHT11Start(int pin);
View grove-buzzer-with-mqtt-and-soracom-beam.ino
/* CodeZine: Grove IoT Starter Kit for SORACOM <grove-buzzer-with-mqtt-and-soracom-beam.ino> */
#include <WioLTEforArduino.h>
#include <WioLTEClient.h>
#include <PubSubClient.h> // https://github.com/knolleary/pubsubclient
#include <stdio.h>
#define APN "soracom.io"
#define USERNAME "sora"
#define PASSWORD "sora"
View grove-ultrasonic-ranger_soracom-harvest.ino
/* CodeZine: Grove IoT Starter Kit for SORACOM <grove-ultrasonic-ranger_soracom-harvest.ino> */
#include <stdio.h>
#include <WioLTEforArduino.h>
WioLTE Wio;
#include <Ultrasonic.h>
#define ULTRASONIC_PIN (WIOLTE_D38)
#define INTERVAL (3000)
#define RECEIVE_TIMEOUT (10000)
View WioLTE_emit_IMEI_to_SORACOM_Harvest.ino
#include <stdio.h>
#include <WioLTEforArduino.h>
WioLTE Wio;
#define CLEAR 0
#define GRAY 90
#define RED 91
#define GREEN 92
#define YELLOW 93
#define BLUE 94
View wio-lte-define-by-ota.ino
/*
Tag on SORACOM Air SIM
key=_conf
value={"working_mode":"uptime","loop_interval":5000,"send_cloud":true,"endpoint_host":"harvest.soracom.io","endpoint_port":8514}
(alt)value={"working_mode":"led","loop_interval":1000}
*/
#include <stdio.h>
#include <string.h>
#include <WioLTEforArduino.h>
WioLTE Wio;