Skip to content

Instantly share code, notes, and snippets.

#include <TM1638.h>
// data,clk,stb
TM1638 tm1638(7, 8, 9);
/// デジタルIOのピンの設定 ///
int signPin = 2; //信号(黄)
int noisePin = 5; //ノイズ(白)
const double alpha=53.032; // cpm = uSv × alpha
@izumogeiger
izumogeiger / hcsr04_lcd.ino
Last active August 11, 2016 13:18
hcsr04_lcd.ino
#include <LiquidCrystal.h>
LiquidCrystal lcd(3, 4, 5, 6, 7, 8);
int Trig = 9;
int Echo = 10;
int Duration;
float Distance;
void setup() {
Serial.begin(9600);
#include <DHT.h>
#define DHTTYPE DHT11
#define DHTPIN 2
DHT dht(DHTPIN, DHTTYPE);
#include <LiquidCrystal.h>
LiquidCrystal lcd(3, 4, 5, 6, 7, 8);
#include <TM1638.h>
TM1638 module(7, 8, 9);
int a;
void setup() {
Serial.begin(9600);
module.setupDisplay(true, 7);
module.clearDisplay();
@izumogeiger
izumogeiger / tm1638sample.ino
Created June 29, 2016 01:21
tm1638sample.ino
/*
Library examples for TM1638.
Copyright (C) 2011 Ricardo Batista <rjbatista at gmail dot com>
This program is free software: you can redistribute it and/or modify
it under the terms of the version 3 GNU General Public License as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@izumogeiger
izumogeiger / pkgt5logger.rb
Created June 28, 2016 02:51
pkgt5logger.rb
require 'pp'
require 'fileutils'
require 'serialport'
require 'net/https'
class Locked < StandardError
end
def lock(lock_file_path='/tmp/pkgt5logger.lock')
File.open(lock_file_path, 'w') do |lock_file|
@izumogeiger
izumogeiger / xmass2014.c
Created December 5, 2014 14:25
xmass illumination control by atmega8
/*
atmega8 16pu + um3281
xmass ilumination
ISP
PC6 RESET
PB5 SCK
PB4 MISO
PB3 MOSI
/*
matrix led board
ISP
PC6 RESET
PB5 SCK
PB4 MISO
PB3 MOSI
/*
atmega8 16pu
matrix led controller
ISP
PC6 RESET
PB5 SCK
PB4 MISO
/*
atmega8 16pu
2 x 8x8 matrix led controller
ISP
PC6 RESET
PB5 SCK
PB4 MISO