Wifi communication

We are working on a device that we would like to control over wifi via a phone or computer. It will be simple tasks, turning on/off lights, motors, etc.

What hardware would be necessary to communicate with arduino over wifi locally? How about if the user is off site? Any products, similar projects, or tutorials you can lead me to will be great.
Thanks

Start by looking this over - it should give you some idea what you are going to want to do. wifi blink led

The use of WiFi immediately suggests an ESP8266 instead of an Arduino.

Paul__B:
The use of WiFi immediately suggests an ESP8266 instead of an Arduino.

Why instead of arduino as opposed to with an arduino? Wouldn't I need the arduino for the wifi module to communicate with? I need something to control the lights, motors, etc. My understanding is that the wifi module can't do that alone.

An Arduino WiFi module can't do that alone, but an ESP8266 is an absolutely complete microcomputer.

Paul__B:
An Arduino WiFi module can't do that alone, but an ESP8266 is an absolutely complete microcomputer.

The ESP8266's I see on sparkfun don't appear to have any i/o ports other than the ones needed to communicate with a separate microcontroller. Am I looking at the wrong thing?

leejones15:
The ESP8266's I see on Sparkfun don't appear to have any i/o ports other than the ones needed to communicate with a separate microcontroller. Am I looking at the wrong thing?

Quite possibly. Show the link.

The ESP-01 module has about four GPIO ports. There are a number of other modules. The ESP-12 as used on the NODEMCU has a dozen or more (can't count them easily just at the moment). Note that it is the same chipset, different modules using that chipset.

The funny thing about the NODEMCU is that it has a USB interface to communicate with a computer, but most computers (and all laptops now) have WiFi, so when you connect it to a computer, you do not need WiFi as such. :grinning:

This is the one I saw: WiFi Module - ESP8266 (4MB Flash) - WRL-17146 - SparkFun Electronics
So are some of those tines for GPIOs? Can this be used to provide the wifi for arduino as the microcontroller? This is all for a high school class I teach, and my students are still fresh to arduinos, so I'd like to stick to one platform.

That is the ESP-01. It provides TX and RX for serial data, and just two GPIO pins. For some obscure reason, the other two pins brought out are essentially useless, one (pin 4) must be pulled high for the chip to operate. But as I mention, other versions have up to a dozen or so GPIO pins available.

Yes, the Arduino certainly can talk to it via the serial interface using the AT command set to connect to networks and send and receive data.

My point was that it is pretty much the same as having an Arduino use a laptop computer merely to talk to the Internet to execute IoT tasks; it is very much the tail wagging the dog since the ESP8266 is basically a hundred times as powerful as the Arduino with a processor running at five times the speed, sixteen times the Flash memory and 48 times the RAM, of which resources only about 20% are used and the rest available for whatever application.

And you can program it via the Arduino IDE.

This is very helpful. Can you direct me to the ESP8266 w/ 12 GPIOs I can purchase? If it uses IDE, I see no reason not to give it a shot, especially if it is more powerful.
Thanks

I like this type of module NodeMcu-Lua-WIFI-development-board-based-on-the-ESP8266 € 2,83

More info about the module http://nodemcu.com

There are a lot of different modules, search for nodemcu on aliexpress or ebay.

Awesome, I didn't know these existed!
Suggestions for a touch screen that can interface with one of these? We'd like to be able to control the device via the touch screen or wifi. The touch screens I had been looking at were arduino shields

I did not interface these modules to anything yet, but a touch screen should be no problem.

Here are some examples ESP8266-TFT-LCD-and-TouchScreen.

Will I be able to run everything off of one ESP-12? I was looking at this site and it shows only 6 available ports after everything else is connected, and from what I can tell a TFT LCD is going to take at least 4. I need to be able to fit a temperature sensor, 3 relays, and possibly an RTC.