Files: [embedded](https://gitlab.cba.mit.edu/erik/attiny44a_blink)(see button_serial.c) [test_app](https://gitlab.cba.mit.edu/erik/serial_cpp)[shelf_app](https://gitlab.cba.mit.edu/erik/htmaa_shelves) (see shelf_button.cpp)
This week we're diving deeper into communication between micrcontrollers and computers.
This week we're diving deeper into communication between microcontrollers and computers.
## Recitation
...
...
@@ -20,7 +20,7 @@ Since Amira doesn't have her magnetic field detector from [HTM(a)A 2016](http://
I want to approach serial communication from a pretty low level, so I'm going to use a C or C++ library. Using OS-specific system calls (as is ultimately pretty much necessary) is a bit too deep, though, since I'd like to be able to write cross-platform code. From some quick googling it looks like the two most popular cross-platform C libraries are [libserial](http://libserial.sourceforge.net/) and [libserialport](https://sigrok.org/wiki/Libserialport). They seem mostly equivalent in features, but libserialport works on Windows in addition to POSIX systems, and Homebrew has a tap for it. Decision made.
The homebrew install worked fine, and I set up a quick test program in C++ based on an [example](https://gist.github.com/Nixes/78e401234e66aa131547d7b78135271c) I found on GitHub. (For those that are curious, I made an imported library target for libserialport in cmake. So that's where I record include directories and linking steps.)
The Homebrew install worked fine, and I set up a quick test program in C++ based on an [example](https://gist.github.com/Nixes/78e401234e66aa131547d7b78135271c) I found on GitHub. (For those that are curious, I made an imported library target for libserialport in cmake. So that's where I record include directories and linking steps.)