Stm32 HC-08
Проблема с блютуз модулем, нужно не много подправить код.
uint8_t Buffer[1];
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
HAL_UART_Receive_IT(&huart1, (uint8_t*)Buffer, 1);
if(Buffer[0] == 1){
HAL_UART_Transmit_IT(&huart1,(uint8_t*)"Ok", 2);}
else
HAL_UART_Transmit_IT(&huart1, (uint8_t*)Buffer, 1);
}
Выполняется приём и else, то есть даже когда я отправляю с телефона 1 мне обратно на телефон приходит 1. Но я не понимаю почему не выполняется условие if.
-
Возможно, это глупый вопрос. Если это так, прошу прощения. Но вы число 1 и цифру (символ) '1' здесь не перепутали?
-
if(Buffer[0] == (uint8_t)'1')
может быть?
-
Current freelance projects in the category C & C++
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x)
22 USD
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x) on the identical hardware platform (ESP32 + SX1268, 2W) based on the criteria of range, throughput, link stability, and power consumption. Conduct tests with… C & C++, C# ∙ 36 minutes back |
Consultation and audit of the current project on Odoo 19 Community EditionWe are looking for an Odoo Developer — a solo developer with experience in Odoo 19 Community Edition, including using Claude Code. We need a specialist who has successfully implemented projects in Odoo and practical experience in development using Claude Code. Important: we only… C & C++, Javascript and Typescript ∙ 3 days 1 hour back ∙ 7 proposals |
Software development for Arduino (RF modules 3–7.5 GHz, automatic frequency scanning)It is necessary to develop a system on Arduino for the automatic search of active analog video signals and the automatic tuning of the transmitter to the detected frequency.It is planned to use three separate transceiver modules: 3000–4200 MHz; 4900–6000 MHz; 6100–7500… C & C++, Embedded Systems & Microcontrollers ∙ 4 days 2 hours back ∙ 4 proposals |
Black Ukraine (RP-project on base MTA)
1157 USD
|
Residential Proxy Infrastructure EngineerWe're building a residential proxy network from scratch — fully owned, no third-party suppliers. We need one exceptional network engineer to build the entire technical foundation. What you'll build: - Android background SDK that routes proxy traffic through user devices… C & C++, DevOps ∙ 9 days 22 hours back ∙ 15 proposals |