I am currently testing my application on an Arduino, and I experience floating pin issues. My program reads the pin status of input pins, which are configured as
pinMode(5, INPUT);
digitalWrite(5, HIGH);
but still they tend to float sometimes.
Will this be solved when I connect the pin directly to a GPIO pin on a RPI? Specifically when the application running on the RPI is not active yet (thus the GPIO pin will not actively high or low yet).
Both the PI and and Arduino will be powered at the same time, but the application on the Arduino will be active much faster than the application on the RPI.
So my concern is that while the RPI is still booting and loading the app, the Arduino might still 'suffer' from floating pins, which gives undesirable output to the things my Arduino controls.
Or, will the fact that the RPI and Arduino both have power, share the same ground, will result in a stable input on the Arduino?
PS: not an expert on electronics, hence the question. I can't test this yet as I don't have all the hardware of this project.