There are a ton of great ideas out there for intertube-connected Arduino projects, but you may find yourself in this situation:
- Router has no more unused ports
- You prefer not to be chained to your router, which may be inconveniently located
- Your Arduino network shield is not WiFi enabled
I prefer to work on a Mac laptop with a WiFi connection, but wanted to do network experiments with an ethernet Arduino shield. Here’s the solution:
- Go to System Preferences | Sharing
- Enable Internet Sharing
- Share the connection from WiFi to Ethernet
Now you can connect an Ethernet cable from your Mac to your Ethernet shield. Because the Mac takes care of crossovers automatically, this will “just work.”
Next you need to find out what IP address to use in your Arduino sketches. Open  a Terminal and type:
ifconfig en0
A few lines down, you’ll see something like:
inet 192.168.2.1
Change that “.1” at the end to any number under 255 and you should have an address that’s shared through your WiFi network, through your Mac, and usable in any Arduino ethernet sketches (I’m using 192.168.2.10). Â Now you can work without worrying about being tethered to a physical router, or being out of free ports.