I've made the attached flowchart to send and receive data with the HC05 HC06 Bluetooth module.
It should respond to a certain number I send via a Bluetooth terminal.
In Arduino it works fine but in Flowcode I get this strange response.
It should dim a green led when it receives "1", and turn the green led on when receiving "2".
It should dim a orange led when it receives "3", and turn the green led on when receiving "4".
This is how it works in Arduino.
When I make the same program in Flowcode, the numbers it responds to aren't 1 to 4, but 98/100/102/104
These are double of the ASCII characters (I just found out when typing..)
Why are these values doubled??
Anyone an idea??
HC05/HC06 macro has strange response?
Moderator: Benj
-
MJU
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
HC05/HC06 macro has strange response?
- Attachments
-
- Bluetooth1.fcfx
- Why is the "back" value doubled??
- (10.06 KiB) Downloaded 317 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: HC05/HC06 macro has strange response?
Hi,
It looks like a software UART timing issue, please could you try the attached updated CAL file?
It needs to go into your Flowcode7 installation "CAL\AVR" folder/directory.
Probably a good idea to make a backup of the one it will replace.
Thanks,
Leigh
It looks like a software UART timing issue, please could you try the attached updated CAL file?
It needs to go into your Flowcode7 installation "CAL\AVR" folder/directory.
Probably a good idea to make a backup of the one it will replace.
Thanks,
Leigh
- Attachments
-
- AVR_CAL_UART.c
- (57.04 KiB) Downloaded 299 times
-
MJU
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
Re: HC05/HC06 macro has strange response?
This is it!LeighM wrote:Hi,
It looks like a software UART timing issue, please could you try the attached updated CAL file?
It needs to go into your Flowcode7 installation "CAL\AVR" folder/directory.
Probably a good idea to make a backup of the one it will replace.
Thanks,
Leigh
Now it works like it should!
Was that a flaw in the UART Leigh?
Thanks for your help!