Skip to content

Instantly share code, notes, and snippets.

@donghee
donghee / gist:877375
Created March 19, 2011 10:19
olleh.com 문자 전송 프로그램
# -*- coding: utf-8 -*-
#!/usr/bin/python
import urllib
import urllib2
import cookielib
import re
from ClientForm import ParseResponse
@donghee
donghee / Falling stars
Created March 20, 2011 08:46
Falling stars
// api http://help.adobe.com/ko_KR/AS3LCR/Flash_10.0/
package {
import flash.utils.Timer;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.TimerEvent;
import flash.ui.Mouse;
@donghee
donghee / Signature Survey
Created April 21, 2011 15:56
Signature Survey in python
#!/usr/bin/python
# Signature Survey Python version
# http://c2.com/doc/SignatureSurvey/
# 2011, Donghee Park
import sys
import re
re_def = re.compile("def (.*):$")
@donghee
donghee / gist:3432545
Created August 23, 2012 04:48
two blink
#include "mbed.h"
DigitalOut led1(LED1);
DigitalOut led2(LED2);
int main() {
int i = 0;
while(1) {
if( i % 2 == 0) {
@donghee
donghee / gist:3432572
Created August 23, 2012 04:51
for blink
#include "mbed.h"
DigitalOut led1(LED1);
DigitalOut led2(LED2);
int main() {
int i = 0;
while(1) {
for( i = 0 ; i < 4 ; i++ ) {
@donghee
donghee / gist:3439906
Created August 23, 2012 18:24
24lc256
// --+-------+--+-- 3.3v
// | | |
// +--------+ | # # 1k pullups
// +-- A0 -| 1 8 |- VDD --+ # #
// +-- A1 -| 2 7 |- WP ----- p29 | |
// +-- A2 -| 3 6 |- SCL ----------+--|-- p27
// +- GND -| 4 5 |- SDA -------------+-- p28
// | +--------+
// GND
@donghee
donghee / gist:3440123
Last active October 9, 2015 04:47
print temperature: TODO 20130228 코드 정리/수정필요.
// TODO: pull 필요 없음!
// +--------+
// | ADD0+-------- GND
// |TMP102 |
// |SCL SDA|
// |--+--+--|
// | |
// ----+--+----------- p27
// -------+----------- p28
//
@donghee
donghee / gist:3445331
Created August 24, 2012 04:09
WS2801 with mbed1768
//
//
// +-------+ +---------+
// | WS2801| | mbed1768|
// | | | |
// | |- SDI --------- p5 - | |
// | |- CKI --------- p6 - | |
// +-------+ +---------+
//
@donghee
donghee / gist:3446262
Created August 24, 2012 06:03
mbed Serialport read and write
#include "mbed.h"
Serial pc(USBTX, USBRX);
DigitalOut myled(LED1);
char serialValue;
int main() {
while(1) {
if(pc.readable()) {
@donghee
donghee / gist:3447220
Last active April 6, 2017 02:11
ws2801 simple version for mbed
#include "mbed.h"
DigitalOut cki(p6);
DigitalOut sdi(p5);
int i;
int main(){
while(1){
cki=0;
wait_ms(1);