IFD:PhysicalComp2011/Julia Putscher/Codes for Arduino and Processing: Difference between revisions

From Medien Wiki
(Created page with "==Codes For Arduino And Processing== ===Arduino=== int an1,an2 = 0; <br> int redLedPin =13; <br> boolean triggered = false; void setup(){ <br> Serial.begin(9600); <br> pinMode...")
 
Line 1: Line 1:
==Codes For Arduino And Processing==
===Arduino===
===Arduino===


Line 152: Line 150:
an1 = Integer.parseInt(val.trim());
an1 = Integer.parseInt(val.trim());
<br>
<br>
xPos++;
<br>
<br>
xPos++;
<br>
<br>
if(xPos > width) xPos = 0;
if(xPos > width) xPos = 0;
Line 160: Line 158:
<br>
<br>
}
}
<br>
<br>
<br>
if(curY >=0){
if(curY >=0){
Line 167: Line 166:
an2 = Integer.parseInt(val.trim());
an2 = Integer.parseInt(val.trim());
<br>
<br>
yPos++;
<br>
<br>
yPos++;
<br>
<br>
if(yPos > width) yPos = 0;
if(yPos > width) yPos = 0;