Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bohemian916
bohemian916 / send_aircon_power.py
Last active September 6, 2018 09:08
エアコンの消費電力をAmbientに送る
from ouimeaux.environment import Environment
import ambient
ambi = ambient.Ambient(xxxx, "xxxxxxxxxxxx")
def on_switch(switch):
print "Switch found!", switch.name
def on_motion(motion):
print "Motion found!", motion.name
@bohemian916
bohemian916 / BME_Ambient.c
Created September 6, 2018 07:45
ESP8266とBME280でAmbientにデータを5分おきに送信するコード
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <SPI.h>
#include "BME280_MOD-1022.h"
#include "Ambient.h"
extern "C" {
#include "user_interface.h"
}
const char* ssid = "xxxxxxxxxx"; // Wifiの SSID