RECEIVER:
int ir_pin = 7; //Sensor pin 1 wired through a 220 ohm resistor
int led_pin = 9; //"Ready to Recieve" flag, not needed but nice
int debug = 0; //Serial connection must be started to debug
int start_bit = 2000; //Start bit threshold (Microseconds)
int bin_1 = 1000; //Binary 1 threshold (Microseconds)
int bin_0 = 400; //Binary 0 threshold (Microseconds)
int lll=0;
void setup() {
pinMode(led_pin, OUTPUT); //This shows when we're ready to recieve
pinMode(ir_pin, INPUT);
digitalWrite(led_pin, LOW); //not ready yet
Serial.begin(9600);
}
void loop() {
int key = getIRKey(); //Fetch the key
Serial.print("Key Recieved: ");
Serial.println(key);
if(key==1301&&lll==0)
{digitalWrite(10, HIGH); lll=1;}
else if(key==1301&&lll==1)
{digitalWrite(10, LOW); lll=0;}
delay(1000);
}
int getIRKey() {
int data[12];
digitalWrite(led_pin, HIGH); //Ok, i'm ready to recieve
while(pulseIn(ir_pin, LOW) < 2200) { //Wait for a start bit
}
data[0] = pulseIn(ir_pin, LOW); //Start measuring bits, I only want low pulses
data[1] = pulseIn(ir_pin, LOW);
data[2] = pulseIn(ir_pin, LOW);
data[3] = pulseIn(ir_pin, LOW);
data[4] = pulseIn(ir_pin, LOW);
data[5] = pulseIn(ir_pin, LOW);
data[6] = pulseIn(ir_pin, LOW);
data[7] = pulseIn(ir_pin, LOW);
data[8] = pulseIn(ir_pin, LOW);
data[9] = pulseIn(ir_pin, LOW);
data[10] = pulseIn(ir_pin, LOW);
data[11] = pulseIn(ir_pin, LOW);
digitalWrite(led_pin, LOW);
if(debug == 1) {
Serial.println("-----");
}
for(int i=0;i<11;i++) { //Parse them
if (debug == 1) {
Serial.println(data[i]);
}
if(data[i] > bin_1) { //is it a 1?
data[i] = 1;
} else {
if(data[i] > bin_0) { //is it a 0?
data[i] = 0;
} else {
data[i] = 2; //Flag the data as invalid; I don't know what it is!
}
}
}
for(int i=0;i<11;i++) { //Pre-check data for errors
if(data[i] > 1) {
return -1; //Return -1 on invalid data
}
}
int result = 0;
int seed = 1;
for(int i=0;i<11;i++) { //Convert bits to integer
if(data[i] == 1) {
result += seed;
}
seed = seed * 2;
}
return result; //Return key number
}
SENDER:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1209565937
2009年1月29日 星期四
2009年1月26日 星期一
Arduino bootloader 教學
只需要自備Arduino Diecimila基本板子
就可以大量購買所需的ATmega168 晶片,自己燒錄bootloader
製造arduino
感謝 Mr.Suz. 開發的avrdude-serjtag工具。
【前po】自製240元的arduino(不含usb connector)
參考網址:
http://robertcarlsen.net/blog/?p=221
http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
就可以大量購買所需的ATmega168 晶片,自己燒錄bootloader
製造arduino
感謝 Mr.Suz. 開發的avrdude-serjtag工具。
【前po】自製240元的arduino(不含usb connector)
參考網址:
http://robertcarlsen.net/blog/?p=221
http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
2009年1月11日 星期日
Siggraph2009: BioLogic: A Natural History of Digital Life
NEW!!!
MSOrgm (Motivational Sensitive Organism) is as 1 of 14 pieces, will be showing in Biologic ART at Siggraph 2009.

Siggraph 2009 - BioLogic Jurors
Marcia Tanner - independent curator and writer based in Berkeley and former director of San Jose Institute of Contemporary Art
Sabrina Raaf - artist working in experimental sculptural media and Asst. Prof. in the School of Art and Design at the University of Illinois at Chicago
Suzanne Anker - artist and theorist, co-author of The Molecular Gaze: Art in the Genetic Age, and Chair of Fine Arts at the School of Visual Arts in NYC
Cezanne Charles - artist, curator, Creative Industries Director for ArtServe Michigan, and former Executive Director of New Media Scotland
Sascha Pohflepp - artist, designer, contributing writer for we-make-money-not-art, and member of Design Interactions at RCA, London
John Marshall - artist, designer, curator, and Asst. Prof. in the School of Art & Design at the University of Michigan
http://www.core.form-ula.com/2008/12/18/eventacm-siggraph-2009leonardocall-for-papers-and-artwork/
MSOrgm (Motivational Sensitive Organism) is as 1 of 14 pieces, will be showing in Biologic ART at Siggraph 2009.

Siggraph 2009 - BioLogic Jurors
Marcia Tanner - independent curator and writer based in Berkeley and former director of San Jose Institute of Contemporary Art
Sabrina Raaf - artist working in experimental sculptural media and Asst. Prof. in the School of Art and Design at the University of Illinois at Chicago
Suzanne Anker - artist and theorist, co-author of The Molecular Gaze: Art in the Genetic Age, and Chair of Fine Arts at the School of Visual Arts in NYC
Cezanne Charles - artist, curator, Creative Industries Director for ArtServe Michigan, and former Executive Director of New Media Scotland
Sascha Pohflepp - artist, designer, contributing writer for we-make-money-not-art, and member of Design Interactions at RCA, London
John Marshall - artist, designer, curator, and Asst. Prof. in the School of Art & Design at the University of Michigan
http://www.core.form-ula.com/2008/12/18/eventacm-siggraph-2009leonardocall-for-papers-and-artwork/
2008年12月21日 星期日
微光泡泡
2008年12月2日 星期二
12/20 MOCA狂想 耶誕社區藝術嘉年華
非常感謝當代藝術館的同仁的包容,給我這麼好的經驗。
【轉載】http://www.mocataipei.org.tw/_chinese/4_education/8_2_detail.asp?ID=378&Tm=1
12/20 MOCA狂想 耶誕社區藝術嘉年華
當人小鬼大的建成國中學生遇上駐校藝術家,會在耶誕佳節前夕奏出什麼樣的狂想曲?
【藝術遊街嘉年華】13:30-14:30
藝術遊街嘉年華│誰說藝術只能用看的?就是要「穿」著藝術走上街頭!
MOCA狂想秀│冬日下午,在當代館廣場舞台上散播的,是滿滿繽紛的活力!
【MOCA小鬼當家市集】14:30-17:00
藝術家擺創意市集不稀奇,國中生當攤位主人才稀罕!
小鬼當家,點子絕對又多又勁爆!在駐校藝術家的帶領下,
小小藝術工作者的大大創意,保證超乎你的想像~
如果你不服氣,就一起動手DIY吧!
【MOCA駐校創藝展】
台北當代藝術館+建成國中=藝術家駐校計劃
『打造巷弄美學:將公共藝術融入學校課程中』成果展
駐校藝術家:洪琳茹、周孟瞱、林瑋、黃致傑、傅子豪、黎美光、陳星合、沈秀玲
報告老師!怪怪!有水管偶人在樹叢神出鬼沒、學生騎著電閃彩虹腳踏車上下學、車篷變成了旋轉木馬和音樂盒、還有人邊走路上學邊數著五彩繽紛的數字旗海…快點來看發生什麼事了啦!
延續過往的藝術家駐校計劃,今年秋季,台北當代藝術館再次與建成國中合作,並擴大合作規模,將公共藝術融入學校的藝術與人文課程中,由藝術家引導學生創作,一起打造美好的巷弄空間和活潑的社區活動。
在視覺藝術家洪琳茹、周孟瞱、林瑋、黃致傑及表演藝術家傅子豪、黎美光、陳星合及沈秀玲與學校藝術與人文教師的共同帶領下,精彩的戶外集體裝置創作展將於12月20日社區嘉年華正式發表並跨年展至1月18日,而長達3個月的酸甜苦辣俱味的駐校過程也將從1月6日至18日在當代館內不藏私揭露。
戶外集體裝置展│2008.12.20-2009.01.18 / 台北市南京西路64巷+台北當代藝術館廣場
駐校創藝成果展│2009.01.06-2009.01.18 / 台北當代藝術館1F教育基地
2008年10月28日 星期二
Arduino?
對程式很粗淺的我
一開始選擇BasicStamp練習
但是,組件很貴、沒錢實在買不起
Arduino有許多優點: 像是C的語法、以及可以與Processing整合、最好不過了
我花了一些時間把B的套件買齊了部份,他網站整理的很好,很多感測器的最佳寫法與電路資料都很清楚,
實在適合我馬上上手、對感測器掌握。
但是,最近我開始接觸Arduino,
我發現他並不難,而且很值得 研究,
應用上更廣,適合玩互動的人學習,
ID-12 or Core-12是一型RFID reader module,
Core-12的電路圖只有一個小地方與ID-12不同,性能與特性一模一樣,
Core-12只需要約680台幣 較ID-12 1000元的價格便宜,
Arduino的晶片網路上找到只要120/塊 的單價,
該花時間 研究一下了:)
************************
自製Arduino清單
(1)7805電壓調整器(voltage regulator)
(2)10uF電容(capacitor)
(3)220 Ohm 電阻(resister)*2
(4)10k電阻
(5)16MH2震盪器(external clock)
(6)22pF陶瓷電容
(7)小開關
成本價: 麵包板(80)+電料(40)+usb/serial模組(可買到350)+ATMEGA168晶片(120)=590元

參考網站:
http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard
一開始選擇BasicStamp練習
但是,組件很貴、沒錢實在買不起
Arduino有許多優點: 像是C的語法、以及可以與Processing整合、最好不過了
我花了一些時間把B的套件買齊了部份,他網站整理的很好,很多感測器的最佳寫法與電路資料都很清楚,
實在適合我馬上上手、對感測器掌握。
但是,最近我開始接觸Arduino,
我發現他並不難,而且很值得 研究,
應用上更廣,適合玩互動的人學習,
ID-12 or Core-12是一型RFID reader module,
Core-12的電路圖只有一個小地方與ID-12不同,性能與特性一模一樣,
Core-12只需要約680台幣 較ID-12 1000元的價格便宜,
Arduino的晶片網路上找到只要120/塊 的單價,
該花時間 研究一下了:)
************************
自製Arduino清單
(1)7805電壓調整器(voltage regulator)
(2)10uF電容(capacitor)
(3)220 Ohm 電阻(resister)*2
(4)10k電阻
(5)16MH2震盪器(external clock)
(6)22pF陶瓷電容
(7)小開關
成本價: 麵包板(80)+電料(40)+usb/serial模組(可買到350)+ATMEGA168晶片(120)=590元

參考網站:
http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard
2008年10月14日 星期二
Generative Components
The challenge is to use the computer and the software to enhance the design part of the process
訂閱:
文章 (Atom)

