Git Repo for the Hello world samples
Samples Content
- 01_pio_mbed_BlinkLed : using mbed from PlatformIO
- 02_pio_arduino_BlinkLed : using Arduino from PlatformIO
- 03_pio_mbed_Pwm : pwm signal on pin PB_4 with 20 ms period
- 04_pio_mbed_uart : 2 UARTS Serial3 for log and Serial2 with uart callback echo character
- 05_pio_mbed_nRF : Not finished, mbed libraries from within platformIO was a bit confusing
- 06_mbed_cli_Hello_BluePill : Switching to the mbed command line (using version 2 here)
- 07_mbed_cli_os_Hello_BluePill : switch to the os which is version 5
- 08_mbed_cli_os_BluePill_Target : adapted the mbed-os to compile for the Bluepill target
- 09_mbed_cli_nRF : STM32 with the #Home Smart Mesh RF configuration
- 10_hello_servomotor : simple servo motor examples
- 11_servo_uart_control : UART interface to control a servo motor from a Raspberry Pi using a Playstation 4 Joystick, the Raps code is here. Note that the PWM is 16 bits and the Joystick refresh rate is 10 ms for a 20 ms servo period, so the control cannot be more fluent.
Testing the Servo UART protocol
- Below we can see the binary command going out of the Raspberry pi, the anylzer is beeing smart here changing the values randomly to characters or ascii code depending on his wish.
- The STM32 with its 72MHz handles an UART callback in 21 us. 4x times faster than one character duration. The last interrupt contains the printf which is in text so takes much longer ~ 1.5 ms.
- Still 8.5 ms are free in the 10 ms period in which the Raspberry pi is sending new servo position commands.
- Every 10 ms the rasp polls the joystick and if there is an update, sends a new servo command.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.