If itoa function gives you an error, use sprintf instead of itoa as shown below sprintf(snum,"%d", x); You need to include stdio.h for this function as shown below /* USER CODE BEGIN Includes */ #include "stdio.h" /* USER CODE END Includes */
Hello sir I have never missed any of your video, your content is amazing I have tried almost all projects, I would recommend you to do a bluepill project where MCU would send a live time data to http server or firebase using GSM(GPRS).
Hello. I am trying to connect an Geeek Pi LCD to NUCLEO-L053R8 using IC2 interface. I was wondering if the I2C address for this LCD will be the same as the LCD used in the example. I would really appreciate if we can connect, i am working on my senior design project.
i am using stm32f030f4p6 and I got problem in liquid_crystal_i2c.c in the syntaxe DWT..... (I changed the source to 0xx...instead of 4xx which means the problem is not here) so what is the problem
Hi, other than the Ground and Vcc, the other 2 pins does it matter which pin it is connected to? Must it be a ADC pin or just normal GPIO pins will do? :)
Hi Sahil, It is very simple. Follow this video for LCD Displayand video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BK-bL9cMOSM.html for DHT11. For I2C speed ***DO NOT CHANGE*** Fast Mode (LCD works Standard mode 100000Hz) I have prepared the code for DHT11 with LCD1602 below /* USER CODE BEGIN Includes */ #include "liquidcrystal_i2c.h" #include "stdio.h" /* USER CODE END Includes */ /* USER CODE BEGIN 0 */ #define DHT11_PORT GPIOB #define DHT11_PIN GPIO_PIN_9 uint8_t RHI, RHD, TCI, TCD, SUM; uint32_t pMillis, cMillis; float tCelsius = 0; float tFahrenheit = 0; float RH = 0; uint8_t TFI = 0; uint8_t TFD = 0; char strCopy[15]; void microDelay (uint16_t delay) { __HAL_TIM_SET_COUNTER(&htim1, 0); while (__HAL_TIM_GET_COUNTER(&htim1) < delay); } uint8_t DHT11_Start (void) { uint8_t Response = 0; GPIO_InitTypeDef GPIO_InitStructPrivate = {0}; GPIO_InitStructPrivate.Pin = DHT11_PIN; GPIO_InitStructPrivate.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStructPrivate.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStructPrivate.Pull = GPIO_NOPULL; HAL_GPIO_Init(DHT11_PORT, &GPIO_InitStructPrivate); // set the pin as output HAL_GPIO_WritePin (DHT11_PORT, DHT11_PIN, 0); // pull the pin low HAL_Delay(20); // wait for 20ms HAL_GPIO_WritePin (DHT11_PORT, DHT11_PIN, 1); // pull the pin high microDelay (30); // wait for 30us GPIO_InitStructPrivate.Mode = GPIO_MODE_INPUT; GPIO_InitStructPrivate.Pull = GPIO_PULLUP; HAL_GPIO_Init(DHT11_PORT, &GPIO_InitStructPrivate); // set the pin as input microDelay (40); if (!(HAL_GPIO_ReadPin (DHT11_PORT, DHT11_PIN))) { microDelay (80); if ((HAL_GPIO_ReadPin (DHT11_PORT, DHT11_PIN))) Response = 1; } pMillis = HAL_GetTick(); cMillis = HAL_GetTick(); while ((HAL_GPIO_ReadPin (DHT11_PORT, DHT11_PIN)) && pMillis + 2 > cMillis) { cMillis = HAL_GetTick(); } return Response; } uint8_t DHT11_Read (void) { uint8_t a,b; for (a=0;a cMillis) { // wait for the pin to go high cMillis = HAL_GetTick(); } microDelay (40); // wait for 40 us if (!(HAL_GPIO_ReadPin (DHT11_PORT, DHT11_PIN))) // if the pin is low b&= ~(1
Open the C file and C header file in any notepad or wordpad , and in keil uv , in the application folder create the .c and .h file and name them accordingly and paste the content in it , it will resolve your issue
Sir, I have tried to follow step by step but when compile find an error : make: *** [Core/Src/subdir.mk:37: Core/Src/liquidcrystal_i2c.o] Error 1 How to fix it sir ?
finally i found my problem, the potentiometer on the driver 8574 was incorrectly adjusted from the factory. Now it works very well, thx :) Can i ask you to make a same vdo with a optocoupler sensor IR RPM, thx in advance ;)
I made a video on STM32CubeIDE Optocoupler sensor module as RPM meter (Tachometer) with STM32F103C8T6. Link is below ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4MUIaXnK8yw.html
../Core/Inc/liquidcrystal_i2c.h(61): warning: #1295-D: Deprecated declaration HD44780_Clear - give arg types i have this error i don't know what to do :( but your video are very useful thank you so much sir
if you change void HD44780_Clear(); in the library to void HD44780_Clear(void); The compiler may not throw this error Add (void) inside the brackets and see
@@NizarMohideen it worked! thank you sir and it only have the error ..\Core\Src\liquidcrystal_i2c.c(32): error: #253: expected a "," thank you so much for helping me sir