Florent Haddad / Mbed 2 deprecated DiscoLogger

Dependencies:   BSP_DISCO_L476VG COMPASS_DISCO_L476VG ConfigFile GYRO_DISCO_L476VG SDFileSystem mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 
00002 /* --------------------------------------------------------
00003 
00004                     DISCOLogger
00005                     
00006 for DISCO-L476VG                    
00007 Version 2.0  February 12th 2016 Florent HADDAD
00008 
00009 
00010 Save on SD card at up to at least 100Hz
00011     Acceleration, 
00012     Gyroscope, 
00013     Compass 
00014     5 Analog input (PA_0..PA_5 except PA_4)
00015 
00016 SdCard connected on :
00017     PE_12 to PE_15 for SPI
00018     3.3V
00019     
00020 Start/Stop switch between 3V and PD_0
00021 
00022 Green led blinks during log
00023 
00024 Requires on sdcard file "index.txt" with folowing line : Index=0
00025 Index.txt defines the next file index name to be written. 
00026 Value written in Index.txt will change after each log.
00027 
00028 tested up to 100Hz acquisition frequency
00029 For any unknown reason, may need to be downloaded twice to run properly !
00030 
00031 
00032 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
00033 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00034 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
00035 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00036 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00037 
00038 
00039 -------------------------------------------------------*/
00040 
00041 
00042 #include "mbed.h"
00043 #include "DefinitionIO.h"
00044 
00045 
00046 
00047 int main()
00048 {
00049     
00050     Init(); //initialization of I/O
00051     Mesures.Update(); //required to start safely IOs
00052     
00053    
00054     while(1) 
00055     {
00056         //main loop is actually performed in a ticker defined in "DefinitionIO/Init()"
00057     }
00058 }