Skip to main content
Roderick D
Associate
May 30, 2018
Question

main program accelerometer and UART

  • May 30, 2018
  • 2 replies
  • 850 views
Posted on May 30, 2018 at 12:35

good morning I am a newbie in STM32F4 and keil uVision 5 or atollic

was to consult about the program that is loaded on the card, does anyone have an example of using the accelerometer? to then execute the accelerometer data and position a servo    and write in the serial port the position through UART

PD: excuse me, I'm Spanish speaking

    This topic has been closed for replies.

    2 replies

    AvaTar
    Senior III
    May 30, 2018
    Posted on May 30, 2018 at 13:14

    If you mean the STM32F4 discovery, the demonstration project uses a LIS302DL accelerometer.

    The full project, including source code, is available in the F4 Discovery Firmware Package you can download

    http://www.st.com/en/embedded-software/stsw-stm32068.html

    .

    then execute the accelerometer data and position a servo    and write in the serial port the position through UART

    That would be the part you have to add yourself.

    But I would start with re-building the Demo project.

    Tesla DeLorean
    Guru
    May 30, 2018
    Posted on May 30, 2018 at 14:11

    Not sure there are examples of all the pieces together, rather you have to find individual components and integrate them.

    Several servo examples, basically a 50 Hz (20 ms) PWM where you modulate the pulse width between 1 to 2 ms.

    Others permitting printf() to output via a USART/VCP

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..