-
-
Save mactkg/cf8f1554174951aafede to your computer and use it in GitHub Desktop.
Revisions
-
mactkg revised this gist
Jul 13, 2014 . 2 changed files with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,5 +9,5 @@ void setup(){ void loop(){ int val=digitalRead(13); Serial.write(val); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,5 @@ int receive; void serialEvent(Serial p){ delay(100); receive = p.read(); } -
mactkg revised this gist
Jul 13, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,8 +17,8 @@ void draw(){ int receive; void serialEvent(Serial p){ delay(100); string buffer = p.readStringUntil('/n'); receive = int(buffer); } -
mactkg revised this gist
Jul 13, 2014 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,19 +4,21 @@ import processing.serial.*; Serial port; void setup(){ size(200,200); port = new Serial(this,"COM3",9600); } void draw(){ delay(100); println(receive); } int receive; void serialEvent(){ delay(100); string buffer = port.readStringUntil('/n'); receive = int(buffer); } -
mactkg revised this gist
Jul 13, 2014 . 2 changed files with 19 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ //=============================== // arduino //=============================== void setup(){ Serial.begin(9600); pinMode(13,INPUT); } void loop(){ int val=digitalRead(13); Serial.println(val); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,24 +1,10 @@ //=============================== // processing //=============================== import processing.serial.*; Serial port; void setup(){ size(200,200); port = new Serial(this,"COM3",9600); @@ -27,10 +13,10 @@ void draw(){ delay(100); println(receive); } int receive; void serialEvent(){ delay(100); receive = port.read(); } -
bureibusan created this gist
Jul 13, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ //=============================== // arduino //=============================== void setup(){ Serial.begin(9600); pinMode(13,INPUT); } void loop(){ int val=digitalRead(13); Serial.println(val); } //=============================== // processing //=============================== import processing.serial.*; Serial port; void setup(){ size(200,200); port = new Serial(this,"COM3",9600); } void draw(){ delay(100); println(receive); } int receive; void serialEvent(){ delay(100); receive = port.read(); }