Skip to content

Instantly share code, notes, and snippets.

View sayacom's full-sized avatar

Hisaya OKADA sayacom

View GitHub Profile
@sayacom
sayacom / use-metadata-service.ino
Last active December 12, 2023 05:56
Example implementation for M5Stack Core2 to use metadata service on SORACOM Air (or Arc)
#define TINY_GSM_MODEM_SIM7080
#define CONSOLE Serial
#include <M5Core2.h>
#include <Wire.h>
#include <WiFi.h>
#include <WireGuard-ESP32.h>
#include <TinyGsmClient.h>
/*
* send_uptime_with_soracom_for_long_time.ino
* Uptime(Working time from bootup) send to Cloud via Unified Endpoint of SORACOM
*
* Copyright (c) 2020 SORACOM, INC.
* This software is released under the MIT License.
* http://opensource.org/licenses/mit-license.php
*/
#define CONSOLE Serial
#include <Wire.h>
#include <MsgPack.h>
#include "DHT.h"
#include "Seeed_BMP280.h"
#include "LIS3DHTR.h"
// Pin assignments for digital/analog input
char led = 4;
char buzzer = 5;
char button = 6;
/*
* Copyright (c) 2021 Hisaya OKADA
* Released under the MIT license
* https://opensource.org/licenses/mit-license.php
*/
#define IMAGE_BUFFER_SIZE 10 * 1024
#define IMAGE_ICON_DIR "/icons"
#define FONT_FILE_PATH "/fonts/KosugiMaru-Regular.ttf"
#define TINY_GSM_MODEM_UBLOX
#define CONSOLE Serial
/*
* Copyright (c) 2021 Hisaya OKADA
* Released under the MIT license
* https://opensource.org/licenses/mit-license.php
*/
#define IMAGE_BUFFER_SIZE 10 * 1024
#define IMAGE_ICON_DIR "/icons"
#define FONT_FILE_PATH "/fonts/KosugiMaru-Regular.ttf"
#define TINY_GSM_MODEM_UBLOX
#define CONSOLE Serial