마우스를 가지고 서보모터 제어하기(코드)
프로세싱코드 import processing.serial.*; Serial port; void setup() { size(999,999); port = new Serial(this, Serial.list()[0],9600); } int a; int b; int c; int d; int e; int f; int g; void draw() { background(255); if(mousePressed) { g = 1; fill(255,0,0); ellipse(mouseX,mouseY,10,10); } else { g = 0; fill(255,255,255); ellipse(mouseX,mouseY,10,10); } int x = mouseX; int y = mouseY; a = x/100; b = x/10%..
더보기