Answer the question
In order to leave comments, you need to log in
HC-05 + Android Bluetooth Module - Array Transfer
Good evening, Habr!
I got this module. I hooked it up to stm32vldiscovery via uart (I used the 1st uart).
The response part is written for Android according to this manual .
There was a problem while trying to pass the elementary sequence "okay". I tried to send it like this:
So:
In any case, only “y” comes, that is, the last byte.
Maybe someone faced such a problem? Something I don’t really want to transfer arrays byte by byte, while synchronizing with delays.
void USART_PutSequence(uint8_t *sequence)
{
while(*sequence != 0) {
USART_SendData(USART1, (uint8_t)*sequence);
sequence++;
}
}
void USART_PutSequence(uint8_t *sequence)
{
USART_SendData(USART1, (uint8_t)sequence[0]);
USART_SendData(USART1, (uint8_t)sequence[1]);
USART_SendData(USART1, (uint8_t)sequence[2]);
USART_SendData(USART1, (uint8_t)sequence[3]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question