Convert cpp & h example to .ino

Hello All,

Done much googling and cannot find a definate answer.
Is there such a thing as a ‘converter’ that will transform one of the AmebaD SDK examples the .cpp & .h files into a usable .ino file to be usued natively in the Arduino IDE.
In other words wanting to convert the 'example_wlan_repeater .cpp& .h files to used in Arduino IDE ( and combining some other code also). The AmebaD Arduino library does not contain the ‘repeater’ sketch

Thank You

1 Like

.ino files are essentially treated the same as .cpp and .h files, and all .ino files are merged into a single .cpp file for the compiler (see this link). You can also have regular .cpp and .h files in a sketch together with .ino files.

The Arduino AmebaD codebase basically runs on top of the SDK code. Most examples are rewritten from SDK examples and will call SDK functions to operate, with some modifications such as classes or wrapper functions to make them easier to use. This is probably the ‘converter’ you are thinking of.

It is probably easier to run the wlan repeater example in AmebaD SDK, since in Arduino several additional layers of code are added to make it easier to use. Is there a particular reason why you want to run it in Arduino?

Hi wyy,

Thank You for taking time to explain the ‘innards’ of how this all ties together.
Here is what i am wanting for the rtlduino (X 2 ) in the end.
The 'example_wlan_repeater" which works as i would like it to,connecting to a drone AP as a repeater, piggybacked to the drone. The ‘drone rtlduino’ then sends it 's AP to a ‘ground rtlduino’ to interface with a tablet with the drone’s software controller on it.

What is lacking with the sole ‘example-wlan_repeater’ in the Amebad SDK :

  1. Also want to have a BLE Beacon running starting AFTER the rtlduino has been powered on for 45 minutes. This will be a locater beacon in case the drone does a fly away. (Ask me how i know) I have had two drones doa fly away way back so it is a lost cause with at least a slight chance of some sort of locator. I know this is surely not as good as getting setting up on an IoT setup via cellular but better than nothing.

  2. Also have asked all over how to get the Builtin LED to blink after a successful connection to the drones AP ,so as to not have to look at phone the rtlduino is in fact connected to the drone’s AP ,before launching the drone initially.
    Some were good enough to respond on this,but i am not smart enough to figure out how to tie this into the existing repeater example code. One member sent a complete code for this but the rtlduino locks up on bootup with this code.

As an aside , in the Arduino SDK I have combined the ‘no encryption AP’, the ‘BLE beacon’,and hacked in from observing other sketches to get the LED to blink on successful connection to drone,but after shutting off drone the LED continues to blink so i need an extra lines of code to shut it off,if disconnected but not smart enough to figure it out. Also the 'no encryption AP sketch is not really what i want as i need the drone rtlduino to be a repeater.

Also worth mentioning is with my repeater setup have increased the FPV range from the stock range of about 125 meters to over 1.2 KM!. Am just lacking the conveineince of the blinking LED on AP connect which seems so trivial,along with not having the ‘locator’ capability which would like to get working.

Would prefer to combine all these features into the Amebad SDK ‘example_wlan_repeater’ and burn this way versus Arduino compile.

Sorry for long post. Hope this makes sense

Thank You

Hi brcisna,

If you are fine with sharing your code, can you post your modified standard SDK code so that I can see what you are working with? Sharing a GitHub link to the code would be fine.

1 Like

@wyy

Just seen this.
Will do this when i get back to home. Out of country now…

Thanks