Unused Pins on Arduino 's & Raspberry 's

You can talk about anything flight (simulation) related here

Moderators: russ, Ralph

Message
Author
User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Unused Pins on Arduino 's & Raspberry 's

#11 Post by jph »

nnyerges wrote: Sun Oct 16, 2022 1:40 am I will keep using 10K resistors held to GND on unused ANALOG inputs. Have a nice day.
:? :roll: There are no 'unused' analog inputs unless YOU specifically set the pin to be an analog input and then try and read from it.
If you take a 'mega' for example, then there is only ONE ADC. YES - ONE.
That is it.
The 16 supposed channels are not 16 ADC units, it is just the one ADC unit along with a 16 input multiplexer..
The mux is only ever set when the pin is called for a read hence the only 'unused' analog inputs are in your mind. ;)
If you want to set the built in input pullups on an unused input then that is fine. Problems with noise will tend to be in your code, or as said, by you not following the correct practices and parameters as described in the datasheet for ADC use.
All the information you need is in there.
:roll:
Joe. CISSP, MSc.

User avatar
nnyerges
Posts: 65
Joined: Sat Jun 18, 2022 6:28 pm

Re: Unused Pins on Arduino 's & Raspberry 's

#12 Post by nnyerges »

At last we return to the original question of this topic:
nnyerges wrote: Mon Oct 10, 2022 4:18 pm I particually program all unused analog pins of Arduinos to INPUT PULLUP...
nnyerges wrote: Mon Oct 10, 2022 4:18 pm This can be done by software if your programming your own sketch and communicate with Air Manager using MessagePort.
But how about Arduino and Raspberry devices managed directly by Air Manager/Air Player scripts?
jph wrote: Sun Oct 16, 2022 5:36 am If you want to set the built in input pullups on an unused input then that is fine.
Using LUA script, how do you do that on Air Manager API?
Chief Technology Officer (CTO) at 360ATC Aviation Training Center
Electronic Engineer. Control & Software Specialist

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Unused Pins on Arduino 's & Raspberry 's

#13 Post by Keith Baxter »

AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Unused Pins on Arduino 's & Raspberry 's

#14 Post by jph »

nnyerges wrote: Sun Oct 16, 2022 11:13 am At last we return to the original question of this topic:

Using LUA script, how do you do that on Air Manager API?
As you have been informed, the I/O pins are digital inputs by default at power on. If you are using a Pi Pico or a Pi then you need to do absolutely nothing as they are enabled WPD on Pico and WPU and WPD on Pi.
If you believe you really 'must' set PU/PD then for control over WPU then there are possibly certain modes that @corjan has set that enable the WPU - on the old hardware such as uno and mega - for example - hw button add.
These all still default high Z digital input - NOT analog.
And no, still do not connect them to GND or VCC or set as outputs :lol:
Joe. CISSP, MSc.

Post Reply