How do I connect my HC05 to Construct 3?

  • Hello dear C3 users,

    I'm trying to connect my Arduino UNO to Construct 3 using the HC-05 Bluetooth module and have tried everything I could so far, including using this pre-made example: Bluetooth - device name

    My intent is to send informations from the Arduino to Construct 3 to affect variables (ie: changing the speed of a projectile depending on the frequency of pulses a sensor is getting).

    The problem I'm having is that my device is never showing after clicking on the 'Request device' button (it only shows some other incompatible devices) and therefore I cannot even connect it to Construct.

    I'm using the last version of Chrome on a Windows 10 OS.

    I hope someone can help me on this part as I really don't know what else to try to make it work now.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Quick update:

    I'm trying to work around by changing the CoD (Class of Device) of my HC-05 with AT commands so it is recognized as a gamepad and using the gamepad options Construct3 is offering to do some actions.

    So far I don't really know what is a viable gamepad tag/CoD to be put as the new class with AT commands but I feel like I'm getting closer (???????? ???00101 00001000).

    As you can see I'm lacking the first 11 bits hence why I put those question marks.

    Why that number?

    <table>

    <tr style = "background-color: #999; color: #fff">

    <th colspan="11">Major Service Class</th>

    <th colspan="5">Major DC</th>

    <th colspan="6">Minor DC</th>

    <th colspan="2">??</th>

    </tr>

    <tr>

    <td>23</td>

    <td>22</td>

    <td>21</td>

    <td>20</td>

    <td>19</td>

    <td>18</td>

    <td>17</td>

    <td>16</td>

    <td>15</td>

    <td>14</td>

    <td>13</td>

    <td>12</td>

    <td>11</td>

    <td>10</td>

    <td>9&nbsp;</td>

    <td>8&nbsp;</td>

    <td>7&nbsp;</td>

    <td>6&nbsp;</td>

    <td>5&nbsp;</td>

    <td>4&nbsp;</td>

    <td>3&nbsp;</td>

    <td>2&nbsp;</td>

    <td>1&nbsp;</td>

    <td>0&nbsp;</td>

    </tr>

    <tr>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>?</td>

    <td>0</td>

    <td>0</td>

    <td>1</td>

    <td>0</td>

    <td>1</td>

    <td>0</td>

    <td>0</td>

    <td>0</td>

    <td>0</td>

    <td>1</td>

    <td>0</td>

    <td>0</td>

    <td>0</td>

    </tr>

    <tr>

    <td colspan="3">hex:</td>

    <td colspan="8">??</td>

    <td colspan="8">?5</td>

    <td colspan="4">08</td>

    </tr>

    </table>

    23rd to 13th bits are unknown to me, I need help here

    12th to 8th bits as 00101 to define it as a peripheral device

    7th and 6th bits as 00 cause it's not a keyboard nor a pointing device

    5th to 2nd bits as 0010 indicating the device is a gamepad

    last 2 could be 00 but I'm not sure yet.

    I used this datasheet to get to the point I'm at : ampedrftech.com/datasheets/cod_definition.pdf

    I'll keep you updated if I find anything else or let me know if you have a better idea/answers to my questions !

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)