Jump to content

LUA script


Geoff S
 Share

Recommended Posts

I see various reference to LUA script concerning Frsky receivers and the Neuron ESCs. I'm seriously considerning getting a Neuron esc for my latest project, partly because of the inbuilt telemetry data.

However, I have no idea what LUA script is. I suspect it's an interpretive language but I don't know. I don't kmow how it's loaded into the (in this case) the esc for example or how to write it in order to adjust the parameters. So what I'm asking is where I can read a tutorial which explains how it's used, how to load it into a device and perhaps how to write it.

I'm not inexperienced in computer languages though I've been retired for nearly 25 years and things have moved on from the 'C', PL9, and various, mostly Motorola, assemblers I used to use/write to drive h/w I'd had a hand in designing. Back to school?

Geoff

Link to comment
Share on other sites

Advert


Hi Geoff

The LUA script is already written and included on the SD card contents for the latest versions of OpenTx.

Once you have Tx and Rx bound and the telemetry connection made to the ESC, you run the script by navigating to it on the Tx via SD card contents screen. Highlight the file and click or long hold enter to run it.

If I remember correctly the only one for Neurons is to set the UBEC voltage.

I did an article recently in the mag on these speed controllers. Sept 2019 issue.

Edited By Chris Bott - Moderator on 03/11/2019 21:59:53

Link to comment
Share on other sites

Most of the settings on a Neuron can only be adjusted by using a free program BLHeli32 which you run on a PC connected to the Neuron using the FrSky USB linker. As Chris said, the LUA script can only adjust the BEC output voltage while BLHeli32 gives more options than you can shake a stick at.

I am running my Neuron as it came out of the box in my UltraStick, though I do use a 1 second slow setting on the throttle channel as acceleration and braking can be a bit abrupt on 1200W. No doubt I could dial out the abruptness using BLHeli32 and one day I might give it a go, but - it all works so why fiddle?

Edited By Bob Cotsford on 03/11/2019 22:15:07

Link to comment
Share on other sites

Thanks, Gents. I suspect I'm overthinking ... again!

Chris, I'd forgotten your piece on the Neuron. I only skim read it because, \at the time, I hadn't thought of getting one. Now I am, I'll read it more carefully. I'm not sure if the OpenTX I uploaded to my Horus is the latest but it was only just over a year ago I did it and I haven' looked since.

The magazine was in the pile on my desk and I've had another look, but it's always better when you have the h/w to hand to try which I have a feeling I will have soon.

thanks again

Geoff

Link to comment
Share on other sites

BLHelIi32 (the 32 is important as there's also a version called BLHeli which won't work for us).

It even has a button for turning an Arduino nano into a USB linker. But given that the linker is a similar price to a nano, you pays your money and makes your choice.

I now have BLHelIi32 as an app on my android phone. Used with an adapter cable, I have found it really useful at the field.

One thing I found particularly nice about the Neuron was being able to set the end points very precisely. Make them match the Tx throttle channel and there are no dead spots at top and bottom of the stick, or tweak to your preference.

The tickover speed available is very very low too, lovely if that's what you like.

Just make sure that the centre pin (+) of the telemetry connection isn't connected through to the Rx. By now, all Neurons sold should turn up with that pin missing anyway, but it's worth a double check.

Link to comment
Share on other sites

To get the most out of the Neuron telemetry you really need to be running the latest version OpenTX 2.3.x onwards as earlier versions will recognise most fields but you miss out on BEC voltage and current. I know it's not often that you need to know how much current your servos are using in flight but you can never have too much info when doing the autopsy on your latest late pride and ex-joy!

Link to comment
Share on other sites

My Horus is on ver OpenTx 2.2 (I've just checked) so I probably need to up date it (if I can remember how ).

My potential 'pride and joy' is currently manifested as a pile of constructed wing panels, wing centres, tail plane, fin, rudder and elevators that look nothing like the Sopwith Pup they're destined to become. There's already a few hours work in there so I want to do all I can to ensure it stays current rather than ex when the test flight takes place. That's why the Neuron appeals to my atrophied geek instincts.

Chris, the last thing I need is a smart phone of any type (I like the giant VDU and full size keyboard I'm using now - and my PC's repairability). So I think I'll stick to workshop tuning.

I note in your article that there's chance of serious damage if you have a separate RX power supply connected. So your comment about removing the +ve supply puzzles me a little (without having h/w to look at). Is there a possible problem even with only the power battery? I was intending to use the the Neuron's BEC as it has a 7 amp capability.

Geoff

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...