Replies

      • I now see the teensy3 is not based on the atmega chip so it will take a little extra work, but it should be possible. I found the ATMega hardware UART cannot do inverted mode, but the SoftSerial as of 1.0 is much more reliable, and most importantly, can do inverted signaling. 

        Your code is much simpler than the code to emulate the old hub protocol, so I am excited we should be able to get this going on the mavboard pretty easily.

        Also, the new version of my board has 2 extra digital and 2 extra analog pins broken out as pins on the edge, in addition to the RC connector (that will connect to the s.bus port), so if one wanted to attach sensors and devices and have that data feed back over the s.bus telemetry, it should be pretty easy. 

        • Hi Mike,

          Just a note I tried porting this to a ATMega168 (one of the original Ardupilot boards!). I can confirm that the SoftSerial does do inverted signalling. I was able to successfully able to get the ATMega talking to the FrSky X8R with a few minor mods to Rolfs code and I was able to get telemetry data on my Taranis (from hardcoded values written in code). However I could not enable the Mavlink code to work successfully. I believe I was getting overflow problems with the limited memory on the 168. I didn't get around to looking into GCS_MAVLink.h file to see if I could 'trim' it down.

          I assume you're using the ATMega328? Did you have any overflow issues?

          Let me know how you go! 

  • Having problem compiling code.  Sorry never done this before.  when I try to compile MavLink_FrSkySPort I get this:         MavLink_FrSkySPort.ino:47:25: fatal error: GCS_MAVLink.h: No such file or directory
    compilation terminated

    when I try to compile FrSkySPort.h  I get this:

    MavLink_FrSkySPort.ino:47:25: fatal error: GCS_MAVLink.h: No such file or directory
    compilation terminated.

    Which code(s) do I compile and load?  How?

    Thanks

    • It's simple...do like this:

      1. Download and extract the MavLink_FrSkySPort_1.2.zip file   (for example. to your desktop)

      2. Open Arduino software and in  menu File/Preference change the sketchbook location to the place you extracted the .zip file, press Ok

      3. Restart Arduino and in the menu File/Sketchbook  select  MavLink_SkySPort

      4. Compile and transfer to Teensy

      ( You must have installed the Teensy extension for Arduino  http://www.pjrc.com/teensy/td_download.html  )

       

      • Hi Rolf,

        I followed your instructions, but always get errors compiling. I have also tried adding the AP_HAL and GCS_MAVLink libraries manually into the libraries folder and including it. Always get errors, such as 


        MavLink_FrSkySPort.ino: In function 'void setup()':
        MavLink_FrSkySPort:122: error: 'Serial2' was not declared in this scope
        MavLink_FrSkySPort.ino: In function 'void loop()':
        MavLink_FrSkySPort:150: error: 'Serial2' was not declared in this scope
        MavLink_FrSkySPort.ino: In function 'void _MavLink_receive()':
        MavLink_FrSkySPort:188: error: 'Serial2' was not declared in this scope
        FrSkySPort.ino: In function 'void FrSkySPort_Init()':
        FrSkySPort:19: error: 'Serial1' was not declared in this scope
        FrSkySPort:20: error: 'UART0_C3' was not declared in this scope
        ...................

        ...................

        I have no idea what I am doing wrong. I am surprised no one else had the issues compiling. Any help would be greatly appreciated.

        Thank you!

        • I think I had that issue at first. Make sure you have the board set to Teensy 3.1.  In the Arduino applications go to tools->board and select Teensy 3.1.  You may even have to restart to get it to work

          • ENQUIRY AFTER VERIFY/COMPILE: 

            1.  PLEASE PRESS THE RESET BUTTON ON TEENSY TO UPLOAD SKETCH. 

            ON MY MINI PRO I PRESS THE RESET BUTTON & THE TEENSY LOADER DOES NOTHING WHILE MINIPRO BLINKS. 

            SUGGESTIONS?

          • Thank you Kent. That worked!!!

      • Rolf,  You are the man.  Got it.

        Thanks

        • Hey , I get the same error, however I followed the above instructions to the point. what was wrong with your setup? 

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…