Resolved! I want to know if I have this right for the STM32 with the HAL library. I have this working on an Atmega. And Arduino has also a lot more examples to find then STM. So due lack of examples I have wrote this.
1) Set output high2) When input is low wait till it is high3) When input is high read 6 characters4) When having read 6 characters then output low and return (or leave while loop)void Get_Instruction(){ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPI...