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

DIY Robocars via Twitter
RT @a1k0n: Did I get rid of hand-tuned parameters? Yes. Am I still hand-tuning more parameters? Also yes. I have a few knobs to address the…
Monday
DIY Robocars via Twitter
RT @a1k0n: I'm not going to spoil it, but (after charging the battery) this works way better than it has any right to. The car is now faste…
Monday
DIY Robocars via Twitter
RT @a1k0n: Decided to just see what happens if I run the sim-trained neural net on the car, with some safety rails around max throttle slew…
Monday
DIY Robocars via Twitter
Sep 24
DIY Robocars via Twitter
RT @SmallpixelCar: @a1k0n @diyrobocars I learned from this. This is my speed profile. Looks like I am too conservative on the right side of…
Sep 24
DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars Dot color is speed; brighter is faster. Yeah, it has less room to explore in the tighter part, and t…
Sep 24
DIY Robocars via Twitter
RT @a1k0n: I'm gonna try to do proper offline reinforcement learning for @diyrobocars and throw away all my manual parameter tuning for the…
Sep 23
DIY Robocars via Twitter
RT @circuitlaunch: DIY Robocars & Brazilian BBQ - Sat 10/1. Our track combines hairpin curves with an intersection for max danger. Take tha…
Sep 22
DIY Robocars via Twitter
RT @SmallpixelCar: Had an great test today on @RAMS_RC_Club track. However the car starts to drift at 40mph. Some experts recommended to ch…
Sep 11
DIY Robocars via Twitter
RT @gclue_akira: 世界最速 チームtamiyaのaiカー https://t.co/1Qq2zOeftG
Sep 10
DIY Robocars via Twitter
RT @DanielChiaJH: Always a good time working on my @diyrobocars car at @circuitlaunch. Still got some work to do if I’m to beat @a1k0n howe…
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: My new speed profile for @RAMS_RC_Club track https://t.co/RtLb7TcgIJ
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: Practiced at @RAMS_RC_Club today with my new @ARRMARC car https://t.co/AEu2hCx89T
Aug 28
DIY Robocars via Twitter
Aug 24
DIY Robocars via Twitter
RT @gclue_akira: 柏の葉で走行させてるjetracerの中身 #instantNeRF #jetracer https://t.co/giVvuE4hP7
Jul 4
DIY Robocars via Twitter
Cool web-based self-driving simulator. Click save when the AI does the right thing https://github.com/pncsoares/self-driving-car
Jul 4
More…