Skip to content

Instantly share code, notes, and snippets.

View TareObjects's full-sized avatar

Koichi Kurahashi TareObjects

View GitHub Profile
// Both_RX-8025NB by kkurahashi 2016-06-21
//
// thanks:
// 秋月のリアルタイムクロック(RTC)モジュール
// http://s2jp.com/2015/03/rtc-module/
//
//
#include <Wire.h>
#include <Time.h>
// ESP_STTS751_Bathtab
// by koichi kurahashi 2016-06-13
// 2016-06-25 : どうしようもなくダメなバグを修正(ftoa->dtostrf)
//
// Thanks:
// 電子工作部
// https://plus.google.com/u/0/communities/114133885055784182372
//
// ESP_Digital_MIC_To_DAC
// by koichi kurahashi 2016-06-08
//
// read SPM0405HD4H and write to MCP4921
//
// Thanks:
// http://www.pwv.co.jp/~take/TakeWiki/index.php?arduino%2FDACを試す
// arduino/DACを試す
//
// ESP_Digital_MIC_To_DAC
// by koichi kurahashi 2016-06-08
//
// read SPM0405HD4H and write to MCP4921
//
// this source does not work. this is just a noise generater.
//
// Thanks:
// http://www.pwv.co.jp/~take/TakeWiki/index.php?arduino%2FDACを試す
// arduino/DACを試す
`define CLOCK_5MH 10
`define CYCLES_1SEC 50000000
// TOP
module ClockGen
(
input wire clk,
input wire res_n,
output wire [2:0] led,
// Arduino_AirQuality_SSD1306
// by koichi kurahashi 2016-05-27
//
// thanks:
// Adafruit SSD1306 library
// https://www.adafruit.com/products/326
//
//
//Arduino_DetectQuake
//
// Thanks:
// Fix_fft
// by http://forum.arduino.cc/index.php?topic=38153.0
// caution : include WProgram.h is deprecated. change to Arduino.h
// and have to append these codes to avoid error.
// #ifndef prog_int8_t
// #define prog_int8_t int8_t
// #endif
// ESP_RAIN_FALL_DETECT by k.kurahashi 2016-04-01
//
// ThingSpeak.com
// https://thingspeak.com/channels/81094
//
#include <Wire.h>
#include <Time.h>
extern "C" {
// ESP_NOW_Sleve(Receiver)
//
// thanks:
// http://lowreal.net/2016/01/14/2
// ESP8266 の低消費電力の限界をさぐる (ESP-NOWを使ってみる)
//
// Arranged by koichi kurahsahi 2016-03-31
// 相手サーバを4つに増やしましたw
//
// ESP_BME280_SSD1306 by k.kurahashi 2016-01-24
//
// thanks:
// BME280 Library
// https://github.com/embeddedadventures/BME280
// OLED Library
// https://github.com/squix78/esp8266-oled-ssd1306
//
// ThingSpeak.com