Skip to content

Instantly share code, notes, and snippets.

View kcal2845's full-sized avatar

Minseok Kim kcal2845

  • Seoul, Korea
View GitHub Profile
/*
kcal2845@naver.com
만능 리모컨입니다. 아두이노 우노, 아두이노 나노, 아두이노 프로 미니 등에서 사용 가능합니다. IRremote 라이브러리가 있어야 합니다.
LED(사용 중인지 확인하는 용도) - 2번핀
VS1838b( 수신기) - 10번핀
적외선 송신 LED - 11번 핀
버튼 갯수를 늘리고 싶다면 btn_number의 숫자를 늘리고, btn_id에 핀 정보를 추가해 주세요.
EEPROM에 기록되기 때문에 전원이 꺼져도 정보는 계속 보존됩니다.
import pyaudio
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import time
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.set_xlim((0,5000))
ax.set_ylim((0,10000))
# 모스 코드를 음파로 변환합니다.
# 제작자 : kcal2845
# 구동 환경 : python 3.6(yaudio와 numpy 모듈 필요)
import pyaudio
import numpy as np
from time import sleep
def sin_wave(f,d): # f = 주파수, d = 실행 길이
a = 1 # 진폭
n = np.arange(fs*d) # n(0,1,2... fs*d)
@kcal2845
kcal2845 / bf_arduino.ino
Created January 7, 2019 06:09
simple bf interpreter in arduino. original C interpreter : https://gist.github.com/maxcountryman/1699708
#include <string.h>
#define TAPE_LENGTH 1000
#define INPUT_LENGTH 300
void interpret(char input[INPUT_LENGTH]) {
unsigned char tape[TAPE_LENGTH] = {0};
unsigned char* ptr = tape;
char current_char;
size_t i;
size_t loop;
@kcal2845
kcal2845 / bf.c
Last active January 7, 2019 06:07 — forked from maxcountryman/bf.c
A simple brainfuck interpreter in C
#include <stdio.h>
#include <string.h>
void interpret(char input[]) {
// initialize the tape with 30,000 zeroes
unsigned char tape[30000] = {0};
// set the pointer to point at the left-most cell of the tape
unsigned char* ptr = tape;
'''
작성자 : kcal2845
피드백 : kcal2845@naver.com
'''
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import time
import numpy as np