This content has been marked as final. Show 1 reply
Divide et impera.
When I understand you right:
- Enable the pulse counter
- Enable UART
- When push the button (read pin) a stream of pulses is generated -> Start a PWM
- When button released (read pin) -> Stop the PWM, read pulse counter, convert to ASCII, send via UART, clear Pulse counter
- Loop to 3.
Try to implement and test one part after the other, use the debugger, use comments in your code