Two-way C++ communication over serial connection

后端 未结 3 1980
予麋鹿
予麋鹿 2021-02-01 08:35

I am trying to write a really simple C++ application to communicate with an Arduino. I would like to send the Arduino a character that it sends back immediately. The Arduino cod

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-01 09:19

    You should check if you have access to /dev/tty.usbmodem641. The usual way in Linux is to add the user to the proper group with adduser.

    By the way, I know that to access the serial port, one needs to open /dev/ttyS0 (for COM1), until /dev/ttyS3. See for example this example in C.

提交回复
热议问题