How To Share Internet From Mac OS X To Arduino Yun

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.

How To Share Internet From Mac OS X To Arduino Yun Open System Preferences

Step 3: Next select Sharing.

How To Share Internet From Mac OS X To Arduino Yun System Preferences Window

Step 4: From the Share your connection from dropdown menu, select WiFi. Then check the box next to Ethernet.

How To Share Internet From Mac OS X To Arduino Yun Sharing Window

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.

How To Share Internet From Mac OS X To Arduino Yun Start Internet Sharing

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.

Subscribe to Email Updates