So long as you don't configure the Arduino analog pins as outputs, which could fry the Pi.
You'd be better off running the Arduino at 3.3V surely (Pro Mini 8MHz?)
If the arduino runs at 3.3 volts (like the Raspberry Pi pins) then have we eliminated this issue? Also, when the Raspberry Pi, or the Arduino, isn't reading or using the respective pins are they leaving them totally alone? (Not changing its electrical nature, not influencing readings). Could the GPIO pins "not mind" any 3.3 volt fluctuation, as long as they aren't actually reading that pin at the moment?
I must say the entire concept is quite stupid. It offers no advantage at all. It is just using a common set of physical pins to talk to either the Pi or the Arduino. So in effect it reduces the number of I/O available to the overall system.
By that standard a USB offers no advantages over a parallel port and serial port, since it reduces to 4 pins what could be better served by 25 PINs parallel printer port and 9-pin serial port. :-D
You might be right that it offers no advantages - unless for some reason it does :) :) You never know...
Can we go any farther?
Only if you want to thoroughly waste your time and ruin two systems.
Yes, I'd like to "thoroughly waste my time" and see if by adding a few cents to the board you can build two subsystems. So, how can we go further down this rabit-hole?
1) What's the cheapest Arduino-compatible microcontroller that can run at 3.3 volts?
2) Are there any pins that would NOT be suitable to be wired to one of the GPIO, Ground, 3.3, or other pins on the Raspberry Pi?
3) Would the fact that it's running at 3.3 volts in fact ensure that there is no possibility of frying either system?
4) Is there any effect to having pins connected this way, if they are NOT being read by the respective subsystem, but they are in fact connected? By "any effect" I mean, would an analog input from an arduino read the same if it's connected to GPIO that is NOT being used by the Pi, as if it were separated and standalone? If A is the pi not reading or using the GPIO pin and B is the arduino reading the pin then will B read the same with A [.joined.] B as with under A . ] separated [. B ? Again, assuming the pi isn't actually using that pin at the moment - will it still affect the reading just by virtue of being connected to it and under power?
5) Separately, if both were using the PIN - would this make it possible to directly communicate between the Pi and Arduino (for example between a GPIO and an Analog pin), in addition to another (saner) way for them to communicate, such as over USB?
The usage case I envision is:
Primary usage case: a person does not use any Raspberry Pi pins whatsoever, leaves them totally unpopulated. These are just empty pins. They would like to use a single on-board analog sensor from the built-in tiny little arduino, so they reuse one of the PINs it's connected to.
Secondary usage case:a person does not use any arduino pins whatsoever. it's just a $5 computer to them. They do use a Raspberry Pi Hat to do something else.
Tertiary usage case: they want a real arduino, not one with a couple of pins attached to an irrelevant subsystem. So they use a Raspberry Pi HAT to add a real, full arduino. The onboard arduino is left totally unused.
So what do you guys think? Is this theoretically possible?
Thanks for any thoughts. I realize it's a pretty out-there idea, but whatever. It's like $1 on top of $5.