Skip to content

Instantly share code, notes, and snippets.

View vestige's full-sized avatar

Makoto Yonezawa vestige

View GitHub Profile
import pyxel
class App:
def __init__(self):
pyxel.init(160, 120, title="hello")
pyxel.run(self.update, self.draw)
def update(self):
pass
from queue import Queue
import threading
import time
from gpiozero import Button
from gpiozero.pins.pigpio import PiGPIOFactory
import sys
from icecream import ic
PIN_SW_NO1 = 5
from queue import Queue
import threading
import time
from gpiozero import LED
from gpiozero.pins.pigpio import PiGPIOFactory
import sys
from icecream import ic
PIN_LED_NO1 = 16
PIN_LED_NO2 = 20
@vestige
vestige / torpc_remote.py
Last active July 26, 2020 07:35
torpc_remote.py
import picamera
import discord
import asyncio
client = discord.Client()
x = 0
#ここをご自身の環境に書き換えてください。
chid = ここにチャンネルIDを貼り付け
token = "ここにBOTトークンを貼り付け"
@vestige
vestige / pwm.py
Last active May 31, 2020 06:34
pwm.py
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setup(16, GPIO.OUT)
pwm = GPIO.PWM(16, 100)
pwm.start(5)
while True:
sleep(0.1)
@vestige
vestige / co2.ino
Created May 23, 2020 02:59 — forked from seki/co2.ino
M5Stack + MH-Z14 CO2 censor
#include <M5Stack.h>
#define NBIN 30
static int16_t s_ring[NBIN];
static int s_curr;
static int16_t s_bg;
static int s_delay = 20000;
static unsigned long s_tm;
void setup() {
@vestige
vestige / NumPlace.rb
Created December 11, 2019 08:54 — forked from Saku35/NumPlace.rb
ナンプレを解くプログラム
def readfile( fn )
fp = open( fn )
str = ""
fp.each_line.map { |ln|
ln.split(",").map { |n| n.to_i }
}
end
def solveNumPlace(problem, stack)
memory = {candidate: [], row: 0, col: 0, problem: []}

こどもの本ミートアップ

ハッシュタグ

  • #meetup_kb

目的

  • こどもの本に関する知見を語り合いたい
  • あたらしい絵本やこども向けの本に出会いたい
  • 小中高生のこどもに面白い本を紹介したい
@vestige
vestige / timer_sc.rb
Last active June 25, 2019 12:50
LT Timer Curses
require "curses"
def finishRestart(win, limit)
str = win.getch
if (str == 'r')
win.clear
win.refresh
timer_start(limit)
elsif (str == 'q')
win.close