关于arduino中的命令窗口
我一直在使用Arduino UNO微控制器进行我的项目。我想知道如何打开一个窗口来键入,例如,char C来完成我分配给它的任务。例如,下面的代码关于arduino中的命令窗口,arduino,Arduino,我一直在使用Arduino UNO微控制器进行我的项目。我想知道如何打开一个窗口来键入,例如,char C来完成我分配给它的任务。例如,下面的代码 #include <Servo.h> Servo servothumb; int command; int x =1; // Define thumb servo void setup() { Serial.begin (115200); servothumb.attach(2); // Set thumb servo to dig
#include <Servo.h>
Servo servothumb;
int command; int x =1;
// Define thumb servo
void setup() {
Serial.begin (115200);
servothumb.attach(2); // Set thumb servo to digital pin 2
}
void loop() {
if(Serial.available() > 0){
command = Serial.read();
if (command == 'c'){}
}
close();
delay(4000); }
void close() {
servothumb.write(0);
}
您需要在com端口上打开一个串行终端程序。因此,在windows中,您可以使用Putty.exe,并将其配置为在com1或Arduino连接到的任何com端口上运行。我认为您最好在这里: