Skip to content

Instantly share code, notes, and snippets.

$ diff -u main/main.c.org main/main.c
--- main/main.c.org     2019-01-17 21:45:21.789814800 +0900
+++ main/main.c 2019-01-17 22:06:08.603979600 +0900
@@ -15,6 +15,8 @@
 #include "esp_event_loop.h"
 #include "esp_http_server.h"

+#include <lwip/sockets.h>
+

static const char* TAG = "camera";

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yoggy
yoggy / polyline.pde
Created July 2, 2018 14:33
polyline_reduce_test.pde
//
// polyline.pde
//
// Copyright (c) 2018 yoggy <yoggy0@gmail.com>
// Released under the MIT license
// http://opensource.org/licenses/mit-license.php;
//
import java.util.*;
class Polyline {
@yoggy
yoggy / minirum.ino
Last active June 19, 2018 12:27
ESPr IR ( https://www.switch-science.com/catalog/2740/ ) で動作を確認したminirum.ino
//
// minirum.ino - ESPr IR(https://www.switch-science.com/catalog/2740/)で動作を確認したminirum.ino
//
// オリジナルはこちら
// https://github.com/9SQ/minIRum/blob/master/minirum/minirum.ino
//
// require
// https://github.com/markszabo/IRremoteESP8266
// https://github.com/interactive-matter/aJson (注意:1.8.5だとaJsonStream::flush()の宣言を修正する必要あり)
//
//
// m5stack_adc_test.ino
//
// Copyright (c) 2018 yoggy <yoggy0@gmail.com>
// Released under the MIT license
// http://opensource.org/licenses/mit-license.php;//
//
#include <M5Stack.h>
void setup() {
size(1024, 500);
background(16,64,128);
noStroke();
fill(32,32,128);
float h = 51;
for (int y = 1; y < height; y += h) {
float w = y % 41 + 20;
for (int x = 0; x < width; x += w) {
@yoggy
yoggy / time_parse_test.txt
Created May 16, 2018 11:40
RubyのTime.parseはタイムゾーンが付いていない文字列をローカルタイムゾーンの時刻として解釈する。
$ irb -r time
irb(main):001:0> Time.parse("2018-1-1 0:0:0.0")
=> 2018-01-01 00:00:00 +0900
irb(main):002:0> Time.parse("2018-1-1 0:0:0.0 UTC")
=> 2018-01-01 00:00:00 UTC
irb(main):003:0> Time.parse("2018-1-1 0:0:0.0 UTC").localtime
=> 2018-01-01 09:00:00 +0900

Raspberry Piにroot-roを適用する手順メモ (2018/3/26)

今回使用したイメージはRaspian Lite 2018-03-13版。 まずEtcherを使ってイメージをmicroSDへ書き込む。

イメージ書き込み後、PCからmicroSDにあるconfig.txtを編集する。

※以下の行を末尾に追加する

dtoverlay=pi3-miniuart-bt

//
// mh-z14-calibration-test.pde
//
// see also... https://www.openhacks.com/uploadsproductos/mh-z14_co2.pdf
//
import processing.serial.*;
byte [] buf = new byte[9];
Serial s = new Serial(this, "COM9", 9600);