Prototype 1(Arduino, Computer)

Arduino

Senosr.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
void setup() {
Serial.begin(2000000);
}

void loop() {
int x_val = analogRead(A0);
int y_val = analogRead(A1);
int z_val = analogRead(A2);

int AE = analogRead(A7);

if(AE >= 500){
AE = 1;
}
else{
AE = 0;
}

Serial.print(x_val);
Serial.print(",");
Serial.print(y_val);
Serial.print(",");
Serial.print(z_val);
Serial.print(",");
Serial.print(AE);
Serial.print("\n");

delay(20);
}
Read more »

제어문

조건문

if-elseif-else

1
2
3
4
5
6
7
8
9
10
if 조건1
실행 문장
elseif 조건2
실행 문장
elseif 조건3
실행 문장
...
else
실행 문장
end

switch

1
2
3
4
5
6
7
8
9
switch(변수)
case(값1)
실행 문장
case(값2)
실행 문장
...
otherwise
실행 문장
end
Read more »

시작

Start - Part Design - Enable hybrid design 체크 박스 해제

  • 확대
    • 가운데 누른 상태 - 왼쪽 클릭 - 위아래 이동

곡선의 정확도

Tools - Option - Display - Performance - 3D Accuracy - 0.01

축 설정

Infrastructure - Part Infrastructure - Part Document - Create an axis system 체크 - Hybrid Design 체크 박스 해제

Read more »