You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been trying to get this library to work for hours and can’t figure something out. I’m using an Arduino Nano and have a very simple program running on it that just prints out “Hi” every second, along with a very simple infinite loop to print out whatever the Arduino sends in (code attached below). For some reason, no matter if I change the length of the string that the Arduino sends and how many bytes are available, the Arduino always outputs 4 seemingly random bytes and then stops each second. Any ideas why this could be?
Hello!
I’ve been trying to get this library to work for hours and can’t figure something out. I’m using an Arduino Nano and have a very simple program running on it that just prints out “Hi” every second, along with a very simple infinite loop to print out whatever the Arduino sends in (code attached below). For some reason, no matter if I change the length of the string that the Arduino sends and how many bytes are available, the Arduino always outputs 4 seemingly random bytes and then stops each second. Any ideas why this could be?
Example output:
Port opened successfully
40
6f2a6c20
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
6f2a6c20
0
0
0
0
0
0
0
0
0
8
6f2a6c20
0
0
// Etc...
Arduino code:
void setup() {
// initialize serial:
Serial.begin(9600);
}
void loop() {
Serial.println("Hi");
delay(1000);
}
C++ code:
#include "include/serial/serial.h"
#include
#include "thread"
int main()
{
serial::Serial my_serial("/dev/cu.usbserial-210", 19200, serial::Timeout::simpleTimeout(3000));
}
Thank you!
The text was updated successfully, but these errors were encountered: