Bracelet project

  First, the background of the demand:

    The 21st century is a high-pressure, fast-paced century, people are busy with a variety of life, work, and gradually realize the importance of the body. Sports and fitness also will pay attention to it, but how to efficiently use the limited time, while maintaining the fitness how to do it?

  Sports bracelet give you a perfect solution.

 

  Second, demand analysis:

    1) OLED display system

    2) Rtc clock

    3) Mobile Bluetooth connection, and sends a control instruction for setting various functions

    4) MPU6050 motion sensor data collected

    5) Heart rate (MAX30102) heart rate data collected by sensors

    6) External Interrupt key operation, switch display data collected by sensors of different

    7) oscillating bracelet wakeup timing into sleep.

 

  Third, involving knowledge points:

    1) rtc alarm clock

    

    2) interruption

      concept:

        cpu running, some event causes cpu temporarily interrupt the running program, special treatment another section of the program, the reform process has been processed and then go back to the original processing procedure. This process is called interrupt.

      External interrupts: A total of 23 software / interrupt events, which EXIT16 to EXIT22 is dedicated interrupt.

         Key to remember:

            RTC-related interruption:

              EXIT17: alarm event

              EXIT21: Intrusion and time stamp events

              EXIT22: wake-up event

        

    

    3) serial ports (Bluetooth)

 

    4) Iic agreement

 

    5) Heart rate (MAX30102) sensor function Transplantation

 

    6) Timer

    

  

  Fourth, the project summary:

    1, an oxygen detection sensor heart transplant:

      Ideas:

        1. Screening nuclear transfer files

          - "main.c

          - "Select file associations

          - "Check the document relates to three times transplanted from main.c method involved is complete

 

        2, modify the source code

          - "Replace core header files

          - "OK pin and replace the pin associated method

          - "core protocol that checks the source follow steps.

          - "test is modified

 

    2, interrupted:

      2-1: misunderstanding place

        1) in the case stm32 bare metal development, timers, interrupt threads can not effect the same effect with the system

 

      2-2: external interrupt and timer interrupt

          Best not to re-nested external interrupt timer ineffective. And control up trouble. Temporarily not find a better solution.

 

 

    3, the pit:

      3-1: Bluetooth data reception timer mode, you can not receive all data intact. Receive only the first character.

      3-2: thinking out of the pit, encountered a problem within 10 minutes can not debug it, then, to stop and analyze the problem. Otherwise it consumed a lot of time.

        

      

Guess you like

Origin www.cnblogs.com/dcli-blog/p/12100450.html