8266 Client / Server communication to perform action
Posted: Thu Feb 02, 2017 7:51 pm
Hello friends!
I just got an Arduino and an 8266 this week. I've managed to flash the 8266 and have some sample code running on it, but programming it feels way out of my league.
I'm looking for some code that will require 2 8266s:
- Server
One 8266 should create a server
This server will only connect to the network briefly and infrequently, but when it is on, it should respond to client request, or depending on ease, just be pingable. This unit will mostly be powered off, but when it is powered on, it should attempt to connect to the wireless network. This server will be assigned a static DHCP address by the router (based on MAC).
- Client
One 8266 should create a client
The client will loop trying to connect to the server via the wireless connection, and when it finds the server (via ping, or via a message that the two communicate) then the client performs an action (EG, light up an LED). If the ping fails (after lighting up from a success) then the light should turn off after X seconds.
How hard is this to program?
I've read some documents (https://cdn.sparkfun.com/assets/learn_t ... _v0.30.pdf) that show the available 8266 AT commands, but I have no real experience with programming. I've seen the WiFi101 boards such as the MKR1000, but I'm curious if this is possible with just the 8266 + Arduino Uno R3?
Thank you in any case!
I just got an Arduino and an 8266 this week. I've managed to flash the 8266 and have some sample code running on it, but programming it feels way out of my league.
I'm looking for some code that will require 2 8266s:
- Server
One 8266 should create a server
This server will only connect to the network briefly and infrequently, but when it is on, it should respond to client request, or depending on ease, just be pingable. This unit will mostly be powered off, but when it is powered on, it should attempt to connect to the wireless network. This server will be assigned a static DHCP address by the router (based on MAC).
- Client
One 8266 should create a client
The client will loop trying to connect to the server via the wireless connection, and when it finds the server (via ping, or via a message that the two communicate) then the client performs an action (EG, light up an LED). If the ping fails (after lighting up from a success) then the light should turn off after X seconds.
How hard is this to program?
I've read some documents (https://cdn.sparkfun.com/assets/learn_t ... _v0.30.pdf) that show the available 8266 AT commands, but I have no real experience with programming. I've seen the WiFi101 boards such as the MKR1000, but I'm curious if this is possible with just the 8266 + Arduino Uno R3?
Thank you in any case!