Hi Chiara,
I got the STM32F411 working. Here is the proper format that worked:
Will be testing out strings and update.
I got the STM32F411 working. Here is the proper format that worked:
Code:
//format for the visi-genie protocol uint8_t *on=(uint8_t[]){0x01, 0x13, 0x00, 0x00, 0x01, 0x13}; //var declared as 8-bit pointer to an 8-bit array of hexadecimals corresponding to user led on uint8_t *off=(uint8_t[]){0x01, 0x13, 0x00, 0x00, 0x00, 0x12}; /same as above for user led off //a little delay so the display syncs with the MCU, should be right before the while(1) loop HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 0); //turn off the display, PA4 -> RST pin of display HAL_Delay(3500); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 1); //turn on the display //Send byte array to UART2 HAL_UART_Transmit(&huart2, (uint8_t*) on, 6, HAL_MAX_DELAY); //turn the user led on HAL_UART_Transmit(&huart2, (uint8_t*) off, 6, HAL_MAX_DELAY); //turn the user led off
Comment