Start: 10:00
C++ Libraries
- Just use the .h files from the library source. I thought they had to be special.
- If you don’t want to change a bunch of properties you can drop the .lib and .h files in the source root directory
- Phil recommended making include and lib directories in the source folders to help with organization.
- On the arduino side it seems you cannot use pre-compiled libraries. I looked all over and could not find one example of someone who used anything but the source.
- Put the source into a folder and then drop it into the libraries folder of the arduino IDE.
- Make sure to disable pre-compiled headers for non-windows libraries.
- new and delete are not defined properly in the arduino IDE. The following is needed for these functions to work properly.
#include <stdlib.h> // for malloc and free
void* operator new(size_t size) { return malloc(size); }
void operator delete(void* ptr) { free(ptr); }
Communication:
- Setup serialization methods to return a char*.
- Changed getData to have a special case for remote data which it handle differently.
End: 6:30
