Skip to main content

Subsection 12.5.5 Part 6: Make It a Library

Activity 12.5.6. Promote the driver to your library.

Once your driver works, you can move it out of your project’s Src folder into the mylib folder, so that it becomes accessible to other projects as well. The header, lsm303agr.h, is already in mylib; you put it there on Tuesday. Follow these steps:

(b)

Copy lsm303agr.c into your mylib folder, then delete it from the Accelerometer project’s Src folder.

(c)

Rebuild the project and run it again, to confirm everything still works from its new home.