Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C system()调用不';Arduino IDE串行监视器中的t显示_C_Arduino - Fatal编程技术网

C system()调用不';Arduino IDE串行监视器中的t显示

C system()调用不';Arduino IDE串行监视器中的t显示,c,arduino,C,Arduino,我有以下代码: void setup() { // Configure the serial communication line at 9600 baud (bits per second.) Serial.begin(9600); delay(1000); system("ifconfig -a > /dev/ttyGSO"); // Configure the button's pin for input signals. pinMo

我有以下代码:

void setup() {
    // Configure the serial communication line at 9600 baud (bits per second.)
    Serial.begin(9600);
    delay(1000);
    system("ifconfig -a > /dev/ttyGSO");

    // Configure the button's pin for input signals.
    pinMode(pinButton, INPUT);
    // Configure the LED's pin for output.
    pinMode(pinLed, OUTPUT);
    // Configure the angle sensor's pin for input.
    pinMode(pinPotent, INPUT);
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);

    lcd.setRGB(colorR, colorG, colorB);

    score = 5;
    angle = analogRead(pinPotent);
}

系统(“ifconfig-a>/dev/ttyGSO”)
调用不会打印到Arduino IDE的串行监视器。但是,如果我直接在串行终端中输入
ifconfig-a>/dev/ttyGSO
,它将按预期打印到监视器上。

这是一个典型的错误,可能需要花费数小时才能找到

这一行有一个输入错误:

system("ifconfig -a > /dev/ttyGSO");
tty设备应以而不是字母
O
终止:

system("ifconfig -a > /dev/ttyGS0");

该死的。。。谢谢我很感激。