using api control example with no success
  • Hi! I am trying to control my gimbal via the serial api with limited success so far. The gimbal itself is working fine. I connected a HC-05 bluetooth device to it and controlling the board via the gui or the android app is working great as well via the bluetooth connection. I went on trying to control via an arduino controller but did not get the control example SerialControl working. So i started debuging the serial signal and it doesn't look too bad. I just had a quick look at the signal that comes out of the bluetooth device connected to the alexmos board with a serial monitor and get like ">CQõõõá>CQõõõU^>CQõõäøõ«úb>CQõõõá>CQõõõá>CQõõõU^>" when my arduino is connected. I didn't break it completely apart yet datawise but as far as i know the ">C" looks as it should. So at least my arduino is sending data and the bluetooth connection is working. Then i had a look at the data when the Android app is connected with the board and noticed the ongoing ">DD". So my first question would be ... do i need something else to make these arduino examples work? I have just the micro controller connected to the alexmos board (with working gimbal setup of course) no other RC is connected. Do i have to init the the control via api in any way or should it just work with the api commands send by arduino with the example sketch loaded. Do i need some sort of heartbeat to keep the "connection" alive? Before i start to debug the real transmitted data bytes in more detail. Does someone has some hint what could be the problem? bluetooth UART is on 115200 baud 8N1. But i guess the parity is not the problem because then it shouldn't work with the app either. Any advice is very much appreciated. By the way. I have firmware 2.43b9 installed.
  • What example are you using? the one I used more than year ago required some coding still to get it working, the basic functionalities where ok though.
  • the includes got scrambled in the comment above but they are correct inttypes.h, SBGC.h, SBGC_Arduino.h
  • Hi, Alex.

    The most common problems are related to UART baud rate. Check that your Arduino board has the same baud rate that bluetooth module has. Also check that you properly select an arduino board type when uploading your sketch.

    Also note, that if you connect serial port to the UART connector on the SBGC board, you should not use USB (because it shares the same port). Power board from a battery.
  • Hi Alex,

    Bluetooth is on 115200 no parity 1 stopbit on both modules (Master and slave) setup. And since the control with the android app with the very same slave bluetooth module is working i guess the bluetooth receiver is not the problem. Serial from Arduino is on 115200 as well and as is wrote the bytes i see received by the slave when i have the arduino connected look quite ok. SBGC board is powerd by battery and i don't use the same serial as usb. Anyway. I just wanted the verify if i need some kind of heartbeat signal or some kind of init process to start the communication which doesn't seem to be case right?
    I think for the next step i will just remove the bluetooth connection (what i should done from the very beginning) and look at the real bytes in hex to see what actually is transmitted and received and if it is according to the api.

    Thanx for giving it some thoughts.

  • Hallo,

    I have the same problem. Could you solve it?