1. Arduino .
2. Arduino UNO R3 , 30 60 .
3. , C#, Windows.Forms.TrackBar.
4. Arduino UNO R3 , , .
5. , C#, (Windows.Forms.Button).
6. , .
7. .
.2 ( ) , . (, ), (, , . .) ( ), (, , ) ( ).
FS90 . 180, .. .
, . :
- ;
- ;
- ; .
Arduino IDE Servo. , . 2 :
- attach(int pinNumber) .
- write(int angle) angle ( 0 180).
, :
#include <Servo.h>
Servo sm;
int pos=0;
void setup() {
???? // 6
???? // 0º
}
void loop() {
???? // 30º
delay(500);
???? // 60º
delay(500)
|
|
}
.3 Arduino IDE Serial, , . Arduino (UART, USART). Serial / 0 (RX) 1 (TX), USB . Serial:
- begin() /c (). : 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600 115200.
- read() C .
- println() ASCII (ASCII 13 '\r') (ASCII 10 '\n').
:
#include <Servo.h>
String inputString = "";
boolean stringComplete = false;
Servo sm;
int pos=0;
void setup() {