Micro-controllers, wireless transmission and database
This project assumes you have already installed STM32CubeIDE. You need to have previously done a basic blink sketch with blue-pill using STM32CubeIDE. I have made a complete video from installing STM32CubeIDE to LED blink program. You can watch it by clicking this link. https://www.youtube.com/watch?v=kXg467nVd_A
Click RCC → High Speed Clock (HSE) to Crystal/Ceramic Resonator
Click connectivity → Click USB
(Tick) Device (FS)
Click Middleware → Click USB_DEVICE
For Class for FS IP → select Communication Device Class (virtual Port Com)
Click Clock Configuration tab → HCLK (MHz) to 72
/* USER CODE BEGIN Includes */ #include "usbd_cdc_if.h" #include "string.h" /* USER CODE END Includes */ /* USER CODE BEGIN PV */ int myNum = 2024; // Integer (whole number) float myFloatNum = 5.98; // Floating point number char myLetter = 'D'; uint8_t myUint = 21; // Same way for uint16_t or uint32_t uint8_t myArray[20] = {0}; char charData[15]; // Data holder /* USER CODE END PV */ /* USER CODE BEGIN WHILE */ while (1) { sprintf(charData, "%s\n", "While reached"); CDC_Transmit_FS((uint8_t *) charData, strlen(charData)); HAL_Delay(100); sprintf(charData, "%d\n", myNum); CDC_Transmit_FS((uint8_t *) charData, strlen(charData)); HAL_Delay(100); sprintf(charData, "%f\n", myFloatNum); CDC_Transmit_FS((uint8_t *) charData, strlen(charData)); HAL_Delay(100); sprintf(charData, "%c\n", myLetter); CDC_Transmit_FS((uint8_t *) charData, strlen(charData)); HAL_Delay(100); sprintf(charData, "%d\n", myUint); CDC_Transmit_FS((uint8_t *) charData, strlen(charData)); HAL_Delay(100); myArray[5]=7; sprintf(charData, "%d\n", myArray[5]); CDC_Transmit_FS((uint8_t *) charData, strlen(charData)); HAL_Delay(100); myNum++; /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */