
How To Share Internet From Mac OS X To Arduino Yun
For a recent project of mine, I needed to download a simple TXT file from the web to my Arduino. Unfortunately, for some reason, my Arduino would not connect to my iPhone's hotspot - so I found the next best solution was to tether the network connection from my MacBook Pro.
However for those of you who have an Arduino Yun, you should consider using the built in WiFi or ethernet port before resorting to the tutorial outlined here!
How to tether/share internet from Mac OS X to Arduino Yun
You will need:
- A Mac running OS X 10.87 or later - I used a 2012 MacBook Pro running OS X El Capitan.
- A WiFi network - my Mac was connected to this WiFi network
- An Ethernet cable, also known as an RJ45
Note: If your Mac does not have an Ethernet socket, this tutorial will not work for your *cough* MacBook Air *cough*. Consider getting a USB-to-Ethernet adapter.
This tutorial is primarily aimed at the Arduino Yun, but should work with all other Arduino's that have an Ethernet port or are compatible with the Ethernet sheild.
Step 1: Connect your Mac to the internet via WiFi. This is likely to be a standard procedure, and one that has already been done if you're viewing this page over WiFi!
Step 2: Go to System Preferences. The easiest way to do this is to click on the Apple logo in the top left-hand corner, and then select System Preferences.
Step 3: Next select Sharing.
Step 4: From the Share your connection from dropdown menu, select WiFi. Then check the box next to Ethernet.
**Step 5:**Now ensure the checkbox next to Internet Sharing has also been ticked. A message will appear asking you to confirm your action; click on Start.
Step 6: Connect one end of your Ethernet cable to the Ethernet port on your Mac, and the other end in to your Arduino Yun. After a few seconds run a test code on your Arduino which fetches a file from the internet. Your Arduino should now be connected to the internet via your Mac.

Thanks for reading!
My name is Zahid Mahmood, and I'm one of the founders of Anterior. I started this technology blog when I was in high school and grew it to over 100,000 readers before becoming occupied with other projects. I've recently started writing again and will be posting more frequently.