A collection of examples organized from basics to advanced.
Dependencies: mbed SDFileSystem
Mbed online compiler has no facility to easily manage a lot of programs or organized them in to related folders. This makes creating an examples and sample pack difficult.
This repository contains a single main.cpp file (which does very little), and a BuildOptions.h file. Simply uncomment the example you would like to compile from the build options. Each example is wrapped in a compiler directive.
If the directive does not include a description comment, it likely does not exist yet. If you would like to contribute to the Examples project, please contact me or fork and issue a pull request.
Diff: buildOptions.h
- Revision:
- 2:17a5c34b3a79
- Parent:
- 1:9a043ee174de
--- a/buildOptions.h Fri Jul 05 04:52:18 2019 +0000 +++ b/buildOptions.h Tue Jul 09 02:23:18 2019 +0000 @@ -1,6 +1,14 @@ -// uncomment only ONE file to build in the example set -// if there is no description, there is likely no code file yet. -// (feel free to support the project by adding one and issuing a pull request ;) +/* uncomment only ONE file to build in the example set + * if there is no description, there is likely no code file yet. + * (feel free to support the project by adding one and issuing a pull request ;) + * + * BE CAREFUL when updating the MBED library! + * New versions often break libraries. + * Example: the included SDFileSystem library requires Release 165, dated Feb 20, 2019. Updates will break it. + * + */ + + // 01_Basics: //#define COMPILE_Blink @@ -13,7 +21,7 @@ // 02_Digital: //#define COMPILE_Button_Interrupt // reads a button using interrupts //#define COMPILE_BlinkWithoutDelay -#define COMPILE_Debounce // reads button using interrupt and timer + callback to debounce the input +//#define COMPILE_Debounce // reads button using interrupt and timer + callback to debounce the input //#define COMPILE_DigitalInputPullup //#define COMPILE_StateChangeDetection //#define COMPILE_ToneKeyboard @@ -89,8 +97,9 @@ // 09_Files_SD: +//#define COMPILE_SD_Speed_Test // Mounts card, creates file, builds random data buffer, write, read, then report speeds +#define COMPILE_SD_Index_File // reads an index.txt file for an integer (as charactor binary), creates new file with that number+1, writes data. Closes. //#define COMPILE_SD_Hello -//#define COMPILE_SD_SpeedTest //#define COMPILE_FatFileSystem //#define COMPILE_Index_and_CSV