Commit 997eedda authored by Erik Strand's avatar Erik Strand

Don't print metadata

parent dd70ec81
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment