Skip to content

Instantly share code, notes, and snippets.

View h-nari's full-sized avatar

Hiroshi Narimatsu h-nari

View GitHub Profile
@h-nari
h-nari / clock.ino
Last active November 8, 2016 14:41
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <time.h>
#define WIFI_SSID "your_wifi_ssid"
#define WIFI_PASSWORD "your_wifi_password"
#define JST 3600*9
void setup() {
Serial.begin(115200);
@h-nari
h-nari / esp8266Arduino.mk
Created August 31, 2016 07:58
modified esp8266Arduino.mk , just comment out ULIBDIRS parts, original (https://github.com/thunderace/Esp8266-Arduino-Makefile)
TARGET = $(notdir $(realpath .))
ARCH = $(shell uname)
ifeq ($(ARCH), Linux)
ROOT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
else
# The extensa tools cannot use cygwin paths, so convert /cygdrive/c/abc/... to c:/cygwin64/abc/...
ROOT_DIR_RAW := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
ROOT_DIR := $(shell cygpath -m $(ROOT_DIR_RAW))
EXEC_EXT = ".exe"
endif
@h-nari
h-nari / Makefile
Created August 31, 2016 07:53
Makefile for HelloWorld.ino on cygwin , ESP8266-Arduino
ARDUINO_VARIANT = nodemcu
SERIAL_PORT := COM3
ARDUINO_HOME := c:/Users/nari/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.3.0
ESP8266_ARDUINO_HOME := /c/Users/nari/AppData/Local/Arduino15/packages/esp8266
XTENSA_TOOLCHAIN := $(ESP8266_ARDUINO_HOME)/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/
ESPTOOL := $(ESP8266_ARDUINO_HOME)/tools/esptool/0.4.9/esptool.exe
GLOBAL_USER_LIBDIR := /c/Program\ Files\ (x86)/Arduino/libraries
LOCAL_USER_LIBDIR := c:/Users/nari/Documents/Arduino/libraries
@h-nari
h-nari / HelloWorld.ino
Created August 31, 2016 07:51
sample sketch for HSES-LCD24( ESP-8266 + ILI9341 Lcd Display)
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 15
#define TFT_CS 2
#define TFT_RST -1
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {