Skip to content
Snippets Groups Projects
Commit 997eedda authored by Erik Strand's avatar Erik Strand
Browse files

Don't print metadata

parent dd70ec81
Branches
No related tags found
No related merge requests found
......@@ -23,9 +23,10 @@ int main() {
list_ports();
//const char* desired_port = "/dev/cu.usbserial-AC01YB5P";
//const char* desired_port = "/dev/ttyUSB0";
const char* desired_port = "/dev/ttyACM0";
const char* desired_port = "/dev/ttyUSB0";
//const char* desired_port = "/dev/ttyACM0";
constexpr uint32_t baud_rate = 115200;
//constexpr uint32_t baud_rate = 19200;
constexpr uint32_t byte_buffer_size = 512;
char byte_buffer[byte_buffer_size];
......@@ -39,7 +40,7 @@ int main() {
while (true) {
int bytes_waiting = sp_input_waiting(port);
if (bytes_waiting > 0) {
std::cout << bytes_waiting << " bytes in the buffer: ";
//std::cout << bytes_waiting << " bytes in the buffer: ";
int byte_num = 0;
byte_num = sp_nonblocking_read(port, byte_buffer, byte_buffer_size);
//bool button_pressed = false;
......@@ -49,7 +50,7 @@ int main() {
//}
std::cout << byte_buffer[i];
}
std::cout << '\n';
//std::cout << '\n';
/*
if (button_pressed) {
std::cout << " the button is pressed!";
......@@ -87,4 +88,3 @@ int main() {
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment