Skip to content

Instantly share code, notes, and snippets.

#define F_CPU 1200000UL
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <avr/sleep.h>
#define IR_ON() (TCCR0A = 0b01000010)
#define IR_OFF() (TCCR0A = 0b00000010)
ISR(INT0_vect){
@yosihisa
yosihisa / EDAMAME_S_R.ino
Last active March 18, 2019 15:20
[SOMESAT2019]えだまめS ローバー型 種コン2019用
#include <Edamame_S.h>
#include <Edamame_S_EX.h>
#define LOOP_TIME 200 //1ループの時間 [ms]
#define DROP_TIME 20 //落下時間 [s]
//ゴール
#define GOAL_LATITUDE 30374521
#define GOAL_LONGITUDE 130959935
@yosihisa
yosihisa / yamanoteGame.cpp
Created April 8, 2021 08:14
九工大 確率特論2021 第1回 山手線ゲーム
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <random>
#define TRIALS 100000 //試行回数
#define MAX_STATION 29 //駅の数