I hereby claim:
- I am ha2zakura on github.
- I am ha2zakura (https://keybase.io/ha2zakura) on keybase.
- I have a public key ASBXf14_VgJlobfkmwHznpVO3hqwpDWbRjPrySpIy9ti4Qo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math, random, sugar | |
type | |
Matrix[T; M, N: static[int]] = array[1..M, array[1..N, T]] | |
# 加法 | |
proc `+`[T, I, J](a: Matrix[T, I, J], b: T): Matrix[T, I, J] = | |
var c: Matrix[T, I, J] | |
for i in 1..I: | |
for j in 1..J: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ADMIN_USER_ID = {製作者のLINE ID}; | |
const CHROSTE_GROUP_ID = {ユニットのLINEグループID}; | |
const CHANNEL_ACCESS_TOKEN = {LINE Messaging APIのアクセストークン}; | |
// 毎週日曜日のトリガー | |
function weekly() { | |
post_differs(CHROSTE_GROUP_ID); | |
} | |
// 毎夜のトリガー |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I2Cのテスト(AQM0802A) | |
// ha2zakura | |
#include <xc.h> // PIC のハードウエア定義 | |
#define _XTAL_FREQ 48000000 | |
#define true 1 | |
#define false 0 | |
#define int8_t signed char |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <MIDI.h> // http://playground.arduino.cc/Main/MIDILibrary | |
#define SS 10 | |
#define A0 9 | |
int tone1Interval = 0; | |
int tone2Interval = 0; | |
int tone3Interval = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LIST P=12f683 | |
#INCLUDE <p12f683.inc> | |
__CONFIG _CP_OFF & _CPD_OFF & _WDT_OFF & _BOD_ON & _IESO_OFF& _PWRTE_ON & _INTOSCIO & _MCLRE_OFF | |
w_temp EQU 0x20 ; Wレジスタ保存用 | |
status_temp EQU 0x21 ; STATUSレジスタ保存用 | |
stand EQU 0x22 ; 立ち上がりフラグ | |
;********************************************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Timer0(16bit!)のテスト | |
// ha2zakura | |
#include <xc.h> // PIC のハードウエア定義 | |
#define _XTAL_FREQ 48000000 | |
#define true 1 | |
#define false 0 | |
#define int8_t signed char |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// とりあえずLチカ | |
// ha2zakura | |
#include <xc.h> // PIC のハードウエア定義 | |
#define _XTAL_FREQ 48000000 | |
#pragma config FOSC = HS, PLLEN = ON, FCMEN = OFF | |
#pragma config IESO = OFF, USBDIV = OFF, CPUDIV = NOCLKDIV | |
#pragma config PWRTEN = OFF, BOREN = OFF, WDTEN = OFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; マトリクスLED | |
; ha2zakura | |
list p=16F84A ; 使用するPICの種類の定義 | |
#include <p16F84A.inc> ; 設定ファイルの指定 | |
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _HS_OSC | |
; _CP_OFF プログラムコードプロテクト無効 | |
; _WDT_OFF ウォッチドドック・タイマ無効 |