Scott Todd wrote: ↑14 Dec 2019, 17:15[re unused analogue inputs]
Phil should respond with a more technical answer but in short, you can just leave them. I have done lots of 3 channel radios and I usually just leave them. He only says its 'untidy'. You could also go into the sketch and zero them out. Somewhere around throttle lock and the slow function, you could just add the commands 'channel[x]=0' where x is each channel you want to zero.
Thats exactly what I do Scott & Bo, if someone specifically wants a 2 or 3 channel set for example I insert 'contrl_pos[x]=0' appropriately to stop them wandering. I do it immediately before the S/C emulation:
Code: Select all
// Centre any unused channels here, eg channel[4]=0;
// Three channels only this edit
contrl_pos[2]=0; contrl_pos[4]=0; contrl_pos[5]=0; // rudder, aux1, aux2
// single-channel emulation
scrudder=0;
// compound button
.
. etc
.
Remember that internally the input order is aileron, elevator, rudder, throttle, aux1, aux2, ch7 regardless of output order AETR/TAER etc ... and that a 3-channel "rudder/elevator/throttle" set uses A0 (aileron) for rudder - hence zeroing contrl_pos[2], contrl_pos[4] and contrl_pos[5], leaving contrl_pos[0], contrl_pos[1] and contrl_pos[3] active for rudder, elevator and throttle respectively. This order has nothing to do with output order AETR/TAER/ETAR etc.
Re the tying of unused inputs, I worry that someone might use an unterminated channel that is simply 'picking up' the adjacent input, thinking its a legit second aileron channel or something - then one day it doesnt!
Remember that you only need parallel the unused signal pins, theres no point paralleling all three pos, neg & signal, in fact one servo plug twisted 90 degrees could connect three unused signal pins.
By far the best way is to 'zero' unused channels as above - easier and neater.
Scott Todd wrote: ↑14 Dec 2019, 17:15
I think half the fun is playing with Phil's code and learning what it does. Then its SO easy to make simple custom mods like this.
Yes its all good fun, though if you make any changes, it is important to thoroughly test all possible combinations & preconditions before flying it. Its common to spend more time testing than writing - "full-combinational parameters testing" and all that - in our case we need to be 100% sure, for safety.
Bo Edstrom wrote: ↑14 Dec 2019, 20:09
Note sure what Editor to use if I'm going to change anything in that file later on but maybe Arduino Web Editor is enough
My suggestion would be to forget the browser-based editor and download the proper IDE locally Bo.
You'll ultimately need a few libraries too, like OLED, ATTiny85, maybe ESP8266 etc all much easier to manage locally.
Cheers
Phil