Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

romanof

macrumors 6502
Original poster
Jun 13, 2020
297
337
Texas
Difficult to find the proper forum for the following, but here goes.

This is a question with probably no answer, but has anybody got an idea for GPIO use on a Mac?

Ok, let me explain. I do a lot of external controlling of this and that with external interfaces. (Hobby, not professional) The Raspberry Pi is made for that and works great. Even the old stuff (really, really old stuff - 8080, Z80, 8086, etc) can be used by directly inputing/outputing to IO pins. A Linux box works also with a legacy parallel printer port but requires the use of being Root, unless you jump though a lot of hoops to give permission to a User. Unfortunately, even though I have many old ISA and PCI parallel port cards, I can't find anywhere to plug them into my M1 Studio.

Jokes aside, while the PI is ready made for the task, even a PI-4 is like an etch-a-sketch when it comes to programming next to a current Mac. It cannot remotely compare to coding on an M1 with a huge monitor and instant response. I am not talking about compile times, which are trivial on either, but just the smoothness of working in the MacOS environment with multiple monitors and tools beyond counting. And reading text on a 17 inch VESA monitor is a real comedown when you are used to sitting in front of a Pro XDR.

I have built several interfaces over the years using the USB to Serial dongle, feeding a UART that then clocks out to a parallel byte, or word or double word, but it requires the use of a serial program and upload/download protocols in addition to all else and is somewhat of a kluge.

There are some industrial USB to IO pinout devices that I have found over the years, but they cost thousands of dollars and probably require service/software subscriptions and formal visits by salespeople. Not exactly hobby stuff.

So, anybody with ideas? Or better yet, experience with such?
 
  • Like
Reactions: PhoenixDown

casperes1996

macrumors 604
Jan 26, 2014
7,433
5,576
Horsens, Denmark
I mean, I don't do GPIO stuff, but I run my very simple website off of a Raspberry Pi that sits in the living room connected to the router. If I want to edit something on it, I use Visual Studio Code on my Mac. I have public key based SSH set up so I can securely SSH into the Raspberry Pi from my Mac and Visual Studio has good support for SSH based editing. So experientially it's like working on my iMac but things are happening on the Raspberry Pi. - If one did also want the local performance for something you can run locally and deploy via scp. Further more, whilst this is rather slow and network speed dependent, you can use X forwarding to get GUI elements running on a Raspberry Pi to show up as windows on your Mac. See screenshot for demonstration

1678209972458.png


That's Nautilus, the Files browser on my Raspberry Pi, running on the Pi and having the window forwarded to my Mac's XQuarts X11 server.
 
  • Like
Reactions: jdb8167 and max2

romanof

macrumors 6502
Original poster
Jun 13, 2020
297
337
Texas
I mean, I don't do GPIO stuff, but I run my very simple website off of a Raspberry Pi that sits in the living room connected to the router. If I want to edit something on it, I use Visual Studio Code on my Mac. I have public key based SSH set up so I can securely SSH into the Raspberry Pi from my Mac and Visual Studio has good support for SSH based editing.
Hmmm. I used to do that on occasion but dropped it when the some new upgrade killed the link to any Linux box and I never got around to troubleshooting. Maybe around Big Sur time or such. In actuality, I would be perfectly happy to just run a single terminal session on the PI and do everything else on the Mac. I remember trying that but can't quite recall the problem, but your post gives me an idea or two. Thanks.
 

romanof

macrumors 6502
Original poster
Jun 13, 2020
297
337
Texas
I don't use GPIO for my Macs but maybe this can get you pointed in the right direction:

That won't help right now, but I am very hopeful that Linux can be made to run on an M series. That would solve so many problems by running an OS totally under the control of the user on a box of superior quality and build. However, despite reading through the article and associated links, I am still not sure where the GPIO hardware would come from or reside.
 

romanof

macrumors 6502
Original poster
Jun 13, 2020
297
337
Texas
That's Nautilus, the Files browser on my Raspberry Pi, running on the Pi and having the window forwarded to my Mac's XQuarts X11 server.

Ok, you have my effusive thanks for triggering a sudden thought that I need to get my head out of my a**. Turning around from your post, I realized that across the room I have an old Intel iMac that does exactly what you are talking about, sans the graphics. I develop circuit cards on the old machine using Kicad, and send the Gerber file to the remote drilling machine on the other end of the basement --- And via SSH to the Raspberry Pi Zero. Develop on the Mac, run to the PI, just like you said.

Obviously I was overthinking the problem. Thanks muchly.
 
  • Like
Reactions: jdb8167

casperes1996

macrumors 604
Jan 26, 2014
7,433
5,576
Horsens, Denmark
Ok, you have my effusive thanks for triggering a sudden thought that I need to get my head out of my a**. Turning around from your post, I realized that across the room I have an old Intel iMac that does exactly what you are talking about, sans the graphics. I develop circuit cards on the old machine using Kicad, and send the Gerber file to the remote drilling machine on the other end of the basement --- And via SSH to the Raspberry Pi Zero. Develop on the Mac, run to the PI, just like you said.

Obviously I was overthinking the problem. Thanks muchly.

Sure thing. Happy to help :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.