Skip to content

Instantly share code, notes, and snippets.

#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
int cnt[26];
int main(void) {
ios_base::sync_with_stdio(false);
#include <queue>
#include <vector>
#include <iostream>
using namespace std;
#define max(n, m) n > m ? n : m
vector<pair<int, int>> world[10001];
vector<pair<int, int>> back[10001];
int recv = 13;
int trans = 3;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(recv, INPUT);
pinMode(trans, OUTPUT);
digitalWrite(trans, HIGH);
#include <IRremote.h>
int remote = A0;
IRrecv irrecv(remote);
decode_results results;
void setup() {
Serial.begin(115200);
irrecv.enableIRIn();
pinMode(remote, INPUT);
/*
* exti.c
*
* Created: 2019-07-07 오전 10:56:40
* Author: user
*/
#include "exti.h"
volatile int bcnt;
/*
* servo.c
*
* Created: 2019-06-30 오후 3:41:18
* Author : yeong
*/
#include <avr/io.h>
#include "timer3.h"
#include "switch.h"
/*
* eeprom.c
*
* Created: 2019-07-13 오후 8:59:22
* Author: yeong
*/
#include "eeprom.h"
#define SPI_SS PB0
#define EEPROM_PAGE_SIZE 16
#define EEPROM_TOTAL_BYTE 128
void EEPROM_eraseALL(void)
{
uint8_t i;
uint16_t pageAddress = 0;
while(pageAddress < EEPROM_TOTAL_BYTE) {
EEPROM_writeEnable();
/*
* w25q64.c
*
* Created: 2019-07-14 오전 2:58:29
* Author : yeong
*/
#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
#include <vector>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
vector<vector<int>> mat;
int nusang[3];