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.

Revision:
1:9a043ee174de
Parent:
0:b471f7764d46
Child:
2:17a5c34b3a79
--- a/buildOptions.h	Thu Jul 04 11:04:42 2019 +0000
+++ b/buildOptions.h	Fri Jul 05 04:52:18 2019 +0000
@@ -1,88 +1,122 @@
 // 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 ;)
+
+// 01_Basics:
+//#define COMPILE_Blink
+//#define COMPILE_Button
+//#define COMPILE_DigitalReadSerial
+//#define COMPILE_Fade
+//#define COMPILE_Analog_In                     // reads analog value, converts to voltage, set LED high or low, prints to terminal
+
+
+// 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_DigitalInputPullup
+//#define COMPILE_StateChangeDetection
+//#define COMPILE_ToneKeyboard
+//#define COMPILE_ToneMelody
+//#define COMPILE_ToneMultiple
+//#define COMPILE_TonePitchFollower
+
+
+// 03_Analog:
+//#define COMPILE_ADC_Internal                  // reads the uController internal temperature, VREF and VBAT inputs.
+//#define COMPILE_AnalogInOutSerial
+//#define COMPILE_AnalogInput
+//#define COMPILE_AnalogWrite
+//#define COMPILE_Calibration
+//#define COMPILE_Fading
+//#define COMPILE_Smoothing
+
+
+// 04_Control:
+//#define COMPILE_arrays
+//#define COMPILE_for loop itteration
+//#define COMPILE_if statement conditional
+//#define COMPILE_switch case
+//#define COMPILE_switch case 2
+//#define COMPILE_while statement conditional
+//#defien COMPILE_compiler_directives
+
+
+// 05_strings:
+//#define COMPILE_character analysis
+//#define COMPILE_string addition operator
+//#define COMPILE_string append
+//#define COMPILE_string case change
+//#define COMPILE_string characters
+//#define COMPILE_strinc comparison
+//#define COMPILE_string constructor
+//#define COMPILE_string index of
+//#define COMPILE_string length
+//#define COMPILE_length trim
+//#define COMPILE_string replace
+//#define COMPILE_string starts ends with
+//#define COMPILE_substring
+//#define COMPILE_string to int
 
 
-/* 01_Basics:
-AnalogReadSerial
-Blink
-DigitalReadSerial
-Fade
-ReadAnalogVoltage
-*/
-//#define COMPILE_Analog_In
-#define COMPILE_Button_Interrupt
-
-/*
+// 06_Communication:
+//#define COMPILE_AScii table
+//#define COMPILE_Dimmer
+//#define COMPILE_Graph
+//#define COMPILE_Midi
+//#define COMPILE_Multiserial
+//#define COMPILE_physicalPixel
+//#define COMPILE_ReadAScii string
+//#define COMPILE_serial call response
+//#define COMPILE_serial call response ascii
+//#define COMPILE_serial event
+//#define COMPILE_serial pass through
+//#define COMPILE_virtual color mixer
 
-02_Digital
-BlinkWithoutDelay
-Button
-Debounce
-DigitalInputPullup
-StateChangeDetection
-ToneKeyboard
-ToneMelody
-ToneMultiple
-TonePitchFollower
 
-03_Analog
-AnalogInOutSerial
-AnalogInput
-AnalogWrite
-Calibration
-Fading
-Smoothing
+// 07_Special_Hardware:
+//#define COMPILE_I2C
+//#define COMPILE_SPI
+//#define COMPILE_PWM
+//#define COMPILE_CaptureCompare
+//#define COMPILE_
+
+
+// 08_USB:
+//#define COMPILE_Keyboard
+//#define COMPILE_key and mouse
+//#define COMPILE_mouse
+
 
-04_Communication
-AScii table
-Dimmer
-Graph
-Midi
-Multiserial
-physicalPixel
-ReadAScii string
-serial call response
-serial call response ascii
-serial event
-serial pass through
-virtual color mixer
+// 09_Files_SD:
+//#define COMPILE_SD_Hello
+//#define COMPILE_SD_SpeedTest
+//#define COMPILE_FatFileSystem
+//#define COMPILE_Index_and_CSV
 
-05_Control
-arrays
-for loop itteration
-if statement conditional
-switch case
-switch case 2
-while statement conditional
 
-06_sensors
-ADXL3xx
-Knock
-Memsic2125
-Ping
-GPS
+// 10_Sensors:
+//#define COMPILE_ADXL3xx
+//#define COMPILE_Knock
+//#define COMPILE_Memsic2125
+//#define COMPILE_Ping
+//#define COMPILE_GPS
+//#define COMPILE_BNO055
+//#define COMPILE_BMP280
+//#define COMPILE_BQ27441
+//#define COMPILE_LM335
+//#define COMPILE_MCP9700
 
-07_Display
-bar graph
-row column scanning
 
-08_strings
-character analysis
-string addition operator
-string append
-string case change
-string characters
-strinc comparison
-string constructor
-string index of
-string length
-length trim
-string replace
-string starts ends with
-substring
-string to int
+// 11_RTOS:
+
+
+// 12_Ethernet:
 
-09_USB
-Keyboard
-key and mouse
-mouse
-*/
\ No newline at end of file
+// 13_Projects:
+
+
+// reorganizing
+// display
+//#define COMPILE_bar graph
+//#define COMPILE_row column scanning
\ No newline at end of file