Arduino connecting to a computer, the painless way!

Hi all,

At the moment my Arduino (Adafruit Huzzah) can connect to my computer only if i specify:

  • internet network name
  • internet password
  • my computer IP Addess
  • my computer port

Every time I change network I have to recompile the board with the new data.
Isn't there a simpler way to connect to the very same computer in different locations?

A possible solution (I guess) would be to give my computer a name, and then create a network directly from it, bypassing the router altogether.
Is that possible? Is there any code I can study and test?


PS links to working code would be sooooo greatly appreciated!

You could set your Huzzah as an access point. Then the computer could connect to it. This would have some serious drawbacks. The computer would not be able to access other networks or the internet while connected to the Huzzah.

Another option could be to use your smartphone as an access point, and have the Huzzah and computer connect to that. At least the computer would be able to access the internet through your smartphone (assuming the phone has a 3G/4G signal at the location).

Thanks for you reply Paul,

I did consider to use it as an accessory point, but for my project I will need two devices, so connecting them to a computer name would be a much easier configuration for me :wink:

Had no idea this would be so difficult actually... _

i don't know if this will help, but this part of the excellent Beginners Guide to ESP8266 shows how to automatics!!y connect to the strongest network. You must hard code the ssid and passwords of the various networks, though.

A common practice for Commercial ESP8266 IOT devices seems to be that the device initially (or if a "reset" button is pushed) comes up as an access point and serves a webpage that allows one's home network parameters to be configured. The device stores these parameters in non-volatile memory and switches to its operational station mode and connects (hopefully) to the home network.

This requires that a wifi device like a smartphone be temporarily attached to the ESP8266 access point/server network to perform the configuration.

Take a look at WiFiManager. If you have every configured a Chromecast gadget, this works in a similar way.