Log measurements on SD card added on DISCO-L476VG board acceleration, omega, compass & 5 Analog values
Dependencies: BSP_DISCO_L476VG COMPASS_DISCO_L476VG ConfigFile GYRO_DISCO_L476VG SDFileSystem mbed
main.cpp@1:e1f3b4b8b99b, 2016-02-13 (annotated)
- Committer:
- flowh
- Date:
- Sat Feb 13 14:29:40 2016 +0000
- Revision:
- 1:e1f3b4b8b99b
- Parent:
- 0:0861bf46efe4
- Child:
- 2:f53340e49cc0
Version 2.1 ; log acc, omega, compass and 5 AI
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
flowh | 1:e1f3b4b8b99b | 1 | |
flowh | 1:e1f3b4b8b99b | 2 | /* -------------------------------------------------------- |
flowh | 1:e1f3b4b8b99b | 3 | |
flowh | 1:e1f3b4b8b99b | 4 | MothLogger |
flowh | 1:e1f3b4b8b99b | 5 | |
flowh | 1:e1f3b4b8b99b | 6 | Version 2.0 February 12th 2016 Florent HADDAD |
flowh | 1:e1f3b4b8b99b | 7 | |
flowh | 1:e1f3b4b8b99b | 8 | |
flowh | 1:e1f3b4b8b99b | 9 | Save on SD card |
flowh | 1:e1f3b4b8b99b | 10 | Acceleration, |
flowh | 1:e1f3b4b8b99b | 11 | Gyroscope, |
flowh | 1:e1f3b4b8b99b | 12 | Compass |
flowh | 1:e1f3b4b8b99b | 13 | 5 Analog input (PA_0..PA_5 except PA_4) |
flowh | 1:e1f3b4b8b99b | 14 | |
flowh | 1:e1f3b4b8b99b | 15 | SdCard connected on : |
flowh | 1:e1f3b4b8b99b | 16 | PE_12 to PE_15 for SPI |
flowh | 1:e1f3b4b8b99b | 17 | 3.3V |
flowh | 1:e1f3b4b8b99b | 18 | |
flowh | 1:e1f3b4b8b99b | 19 | Start/Stop switch between 3V and PD_0 |
flowh | 1:e1f3b4b8b99b | 20 | |
flowh | 1:e1f3b4b8b99b | 21 | Green led blinks during log |
flowh | 1:e1f3b4b8b99b | 22 | |
flowh | 1:e1f3b4b8b99b | 23 | tested up to 100Hz acquisition frequency |
flowh | 1:e1f3b4b8b99b | 24 | For any unknown reason, may need to be downloaded twice to run properly ! |
flowh | 1:e1f3b4b8b99b | 25 | |
flowh | 1:e1f3b4b8b99b | 26 | |
flowh | 1:e1f3b4b8b99b | 27 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
flowh | 1:e1f3b4b8b99b | 28 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
flowh | 1:e1f3b4b8b99b | 29 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
flowh | 1:e1f3b4b8b99b | 30 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
flowh | 1:e1f3b4b8b99b | 31 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
flowh | 1:e1f3b4b8b99b | 32 | |
flowh | 1:e1f3b4b8b99b | 33 | |
flowh | 1:e1f3b4b8b99b | 34 | -------------------------------------------------------*/ |
flowh | 1:e1f3b4b8b99b | 35 | |
flowh | 1:e1f3b4b8b99b | 36 | |
flowh | 0:0861bf46efe4 | 37 | #include "mbed.h" |
flowh | 0:0861bf46efe4 | 38 | #include "DefinitionIO.h" |
flowh | 0:0861bf46efe4 | 39 | |
flowh | 0:0861bf46efe4 | 40 | |
flowh | 0:0861bf46efe4 | 41 | |
flowh | 0:0861bf46efe4 | 42 | int main() |
flowh | 0:0861bf46efe4 | 43 | { |
flowh | 0:0861bf46efe4 | 44 | |
flowh | 1:e1f3b4b8b99b | 45 | Init(); //initialization of I/O |
flowh | 1:e1f3b4b8b99b | 46 | Mesures.Update(); //required to start safely IOs |
flowh | 0:0861bf46efe4 | 47 | |
flowh | 1:e1f3b4b8b99b | 48 | |
flowh | 1:e1f3b4b8b99b | 49 | while(1) |
flowh | 1:e1f3b4b8b99b | 50 | { |
flowh | 1:e1f3b4b8b99b | 51 | //main loop is actually performed in a ticker defined in "DefinitionIO/Init()" |
flowh | 0:0861bf46efe4 | 52 | } |
flowh | 1:e1f3b4b8b99b | 53 | } |