2018-05-30 03:35 AM
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 UARTPD: excuse me, I'm Spanish speaking
2018-05-30 04:14 AM
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.
2018-05-30 05:11 AM
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