Skip to content

Instantly share code, notes, and snippets.

@nomolk
nomolk / M5Stack_FirebaseNihongoDisplay.ino
Last active February 10, 2020 21:03
Display Japanese text from firebase on M5Stack.
#include <IOXhop_FirebaseESP32.h>
// Set these to run example.
#define WIFI_SSID "xxxxxxxx"
#define WIFI_PASSWORD "xxxxxxxx"
#define FIREBASE_DB_URL "home-messenger-xxxxx.firebaseio.com"
#define FIREBASE_DB_DATA_PATH "/messages"
#define FIREBASE_DB_DATA_KEY "/mobile1ToHome"
#include <ESP32_SD_ShinonomeFNT.h>
#include <ESP32_SD_UTF8toSJIS.h>
@nomolk
nomolk / scrattino_ir.ino
Created June 16, 2018 16:05
Scrattino2 callback sample (send IR signal)
/*
Firmata is a generic protocol for communicating with microcontrollers
from software on a host computer. It is intended to work with
any host computer software package.
To download a host software package, please click on the following link
to open the list of Firmata client libraries in your default browser.
https://github.com/firmata/arduino#firmata-client-libraries
@nomolk
nomolk / scrattino_cady_wigi.ino
Created July 8, 2018 14:32
Scrattino2 callback sample (send IR signal) for JJRC CADY WIGI
/*
Firmata is a generic protocol for communicating with microcontrollers
from software on a host computer. It is intended to work with
any host computer software package.
To download a host software package, please click on the following link
to open the list of Firmata client libraries in your default browser.
https://github.com/firmata/arduino#firmata-client-libraries
@nomolk
nomolk / scratch_remote_cady_wigi.ino
Last active July 9, 2018 00:47
A sketch for ESP8266 to be controlled with Scratch and send infrared signal for JJRC CADY WIGI
#include <ESP8266WiFi.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
const char* ssid = "*****"; //wifiのssid
const char* password = "*****"; //wifiのパスワード
const char* host = "xxx.xxx.xxx.xxx"; //Scratchの入っているPCのIPアドレス
const int Port = 42001;
@nomolk
nomolk / scratch_remote_cady_wigi_M5Stack.ino
Last active July 9, 2018 00:48
A sketch for M5Stack to be controlled with Scratch and send infrared signal for JJRC CADY WIGI
#include <M5Stack.h>
#include <WiFi.h>
#include <IRremote.h>
#include <WiFiClient.h>
String wifi_ssid = "*****"; //wifiのssid
String wifi_password = "*****"; //wifiのパスワード
int sendPin = 26;
boolean settingMode;
#include "Keyboard.h"
#include "Mouse.h"
const int KeyNum = 8;
int threshold[KeyNum] = {
//しなぷすのハード製作記 https://synapse.kyoto/calc/ResDiv/page001.html にて算出
46, 161, 296, 437, 585, 728, 857, 974
// R1 : 1kΩ 1k
// R2 : 110Ω 120