I have a device built with an Arduino uno:
Arduino software installed on an Arduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent within 5 seconds, it sends a no-change serial message
What is needed:
Use an ESP8266 to provide a bridge between current Arduino software and MQTT / web
I can program the ESP8266 as a web server, MQTT client, etc with the Arduino IDE or Lua (but I prefer the Arduino IDE since I can reuse parts of the code to generate / interpret communication).
the ESP8266 will handle everything that is required for wifi / web / MQTT; without the MQTT module the Arduino part will work stand-alone, only the remote control will be missing.
I would like to make minimal changes to the Arduino code (or none, if possible). Any changes would involve extensive re-testing, which I try to avoid.
the ESP8266 can be missing in some installs.
What options I found:
- Serial
ESP8266 can read the serial output and be a bridge between web/MQTT and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the Arduino part.
- I2C
Make the Arduino the I2C master and the ESP8266 the slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread this thread.
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so the number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to reinvent the wheel..
Thank you for your time!
I have a device built with an Arduino uno:
Arduino software installed on an Arduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent within 5 seconds, it sends a no-change serial message
What is needed:
Use an ESP8266 to provide a bridge between current Arduino software and MQTT / web
I can program the ESP8266 as a web server, MQTT client, etc with the Arduino IDE or Lua (but I prefer the Arduino IDE since I can reuse parts of the code to generate / interpret communication).
the ESP8266 will handle everything that is required for wifi / web / MQTT; without the MQTT module the Arduino part will work stand-alone, only the remote control will be missing.
I would like to make minimal changes to the Arduino code (or none, if possible). Any changes would involve extensive re-testing, which I try to avoid.
the ESP8266 can be missing in some installs.
What options I found:
- Serial
ESP8266 can read the serial output and be a bridge between web/MQTT and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the Arduino part.
- I2C
Make the Arduino the I2C master and the ESP8266 the slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread.
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so the number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to reinvent the wheel..
Thank you for your time!
I have a device built with an Arduino uno:
Arduino software installed on an Arduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent within 5 seconds, it sends a no-change serial message
What is needed:
Use an ESP8266 to provide a bridge between current Arduino software and MQTT / web
I can program the ESP8266 as a web server, MQTT client, etc with the Arduino IDE or Lua (but I prefer the Arduino IDE since I can reuse parts of the code to generate / interpret communication).
the ESP8266 will handle everything that is required for wifi / web / MQTT; without the MQTT module the Arduino part will work stand-alone, only the remote control will be missing.
I would like to make minimal changes to the Arduino code (or none, if possible). Any changes would involve extensive re-testing, which I try to avoid.
the ESP8266 can be missing in some installs.
What options I found:
- Serial
ESP8266 can read the serial output and be a bridge between web/MQTT and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the Arduino part.
- I2C
Make the Arduino the I2C master and the ESP8266 the slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread.
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so the number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to reinvent the wheel..
Thank you for your time!
- 1.6k
- 1
- 12
- 17
Protcol Protocol options for data exchange between Arduino and ESP8266
I have a device built with an arduinoArduino uno:
arduinoArduino software installed on an arduinoArduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent inwithin 5 seconds, it sends a no-change serial message
What is needed:
Use an esp8266ESP8266 to provide a bridge between current Arduino software and MqttMQTT / web
I can program the espESP8266 as a web server, mqttMQTT client, etc with the Arduino IDE or luaLua (but I prefer the Arduino IDE since I can reuse partparts of the code to generate / interpret communication).
the espESP8266 will handle everything that is required for wifi / web / mqtt;MQTT; without the mqttMQTT module the arduinoArduino part will work stand-alone, only the remote controllcontrol will be missing.
I would like to make minimal changes to the arduinoArduino code (or none, if possible). Any changes would involve extensive re-testing, which I try to avoid.
the esp8266ESP8266 can be missing in some installs.
What options I found:
- Serial
EspESP8266 can read the serial output and be a bridge between web/mqttMQTT and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the arduinoArduino part.
- I2C
Make the arduinoArduino the I2C master and the espESP8266 the slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread I2C 2 way communication between Arduino Uno and Arduino Megathis thread .
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so the number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to re-inventreinvent the wheel..
Thank you for your time!
Protcol options for data exchange between Arduino and ESP8266
I have a device built with an arduino uno:
arduino software installed on an arduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent in 5 seconds, it sends a no-change serial message
What is needed:
Use an esp8266 to provide a bridge between current Arduino software and Mqtt / web
I can program the esp as a web server, mqtt client, etc with the Arduino IDE or lua (but I prefer the Arduino IDE since I can reuse part of the code to generate / interpret communication).
the esp will handle everything that is required for wifi / web / mqtt; without the mqtt module the arduino part will work stand-alone, only the remote controll will be missing
I would like to make minimal changes to the arduino code (or none, if possible). Any changes would involve extensive re-testing which I try to avoid.
the esp8266 can be missing in some installs
What options I found:
- Serial
Esp can read the serial output and be a bridge between web/mqtt and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the arduino part.
- I2C
Make the arduino the I2C master and the esp slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread I2C 2 way communication between Arduino Uno and Arduino Mega
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to re-invent the wheel..
Thank you for your time!
Protocol options for data exchange between Arduino and ESP8266
I have a device built with an Arduino uno:
Arduino software installed on an Arduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent within 5 seconds, it sends a no-change serial message
What is needed:
Use an ESP8266 to provide a bridge between current Arduino software and MQTT / web
I can program the ESP8266 as a web server, MQTT client, etc with the Arduino IDE or Lua (but I prefer the Arduino IDE since I can reuse parts of the code to generate / interpret communication).
the ESP8266 will handle everything that is required for wifi / web / MQTT; without the MQTT module the Arduino part will work stand-alone, only the remote control will be missing.
I would like to make minimal changes to the Arduino code (or none, if possible). Any changes would involve extensive re-testing, which I try to avoid.
the ESP8266 can be missing in some installs.
What options I found:
- Serial
ESP8266 can read the serial output and be a bridge between web/MQTT and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the Arduino part.
- I2C
Make the Arduino the I2C master and the ESP8266 the slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread .
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so the number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to reinvent the wheel..
Thank you for your time!
I have a device built with an arduino uno:
arduino software installed on an arduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent in 5 seconds, it sends a no-change serial message
What is needed:
Use an esp8266 to provide a bridge between current Arduino software and Mqtt / web
I can program the esp as a web server, mqtt client, etc with the Arduino IDE or lua (but I prefer the Arduino IDE since I can reuse part of the code to generate / interpret communication).
the esp will handle everything that is required for wifi / web / mqtt; without the mqtt module the arduino part will work stand-alone, only the remote controll will be missing
I would like to make minimal changes to the arduino code (or none, if possible). Any changes would involve extensive re-testing which I try to avoid.
the esp8266 can be missing in some installs
What options I found:
- Serial
Esp can read the serial output and be a bridge between web/mqtt and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the arduino part.
- I2C
Make the arduino the I2C master and the esp slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread I2C 2 way communication between Arduino Uno and Arduino Mega
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to re-invent the wheel..
Thank you for your time!
I have a device built with an arduino uno:
arduino software installed on an arduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent in 5 seconds, it sends a no-change serial message
What is needed:
Use an esp8266 to provide a bridge between current Arduino software and Mqtt / web
I can program the esp as a web server, mqtt client, etc with the Arduino IDE or lua (but I prefer the Arduino IDE since I can reuse part of the code to generate / interpret communication).
the esp will handle everything that is required for wifi / web / mqtt; without the mqtt module the arduino part will work stand-alone, only the remote controll will be missing
I would like to make minimal changes to the arduino code (or none, if possible). Any changes would involve extensive re-testing which I try to avoid.
the esp8266 can be missing in some installs
What options I found:
- Serial
Esp can read the serial output and be a bridge between web/mqtt and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the arduino part.
- I2C
Make the arduino the I2C master and the esp slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread I2C 2 way communication between Arduino Uno and Arduino Mega
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to re-invent the wheel..
Thank you for your time!
I have a device built with an arduino uno:
arduino software installed on an arduino uno
can be controlled via serial commands
can be controlled via physical buttons and sensors
on any button/sensor state change it writes the current state to serial
if no message has been sent in 5 seconds, it sends a no-change serial message
What is needed:
Use an esp8266 to provide a bridge between current Arduino software and Mqtt / web
I can program the esp as a web server, mqtt client, etc with the Arduino IDE or lua (but I prefer the Arduino IDE since I can reuse part of the code to generate / interpret communication).
the esp will handle everything that is required for wifi / web / mqtt; without the mqtt module the arduino part will work stand-alone, only the remote controll will be missing
I would like to make minimal changes to the arduino code (or none, if possible). Any changes would involve extensive re-testing which I try to avoid.
the esp8266 can be missing in some installs
What options I found:
- Serial
Esp can read the serial output and be a bridge between web/mqtt and serial, will store the current state in memory to be sent when requested to avoid polling the device every time.
One of the benefits is no code changes / testing required for the arduino part.
- I2C
Make the arduino the I2C master and the esp slave (or the other way around) and implement bi-directional communication. Got the idea by reading this thread I2C 2 way communication between Arduino Uno and Arduino Mega
Some other information about the serial commands:
A data packet (command or state description) consists of 1 to 20 characters, with a possible peak of 20 packets in 5 seconds, and an average of one packet every 3 seconds. If needed, I can make this send 5 unsigned integers instead of alphanumeric characters.
If more than the I2C / serial pins are needed I can upgrade to an Arduino Mega (so number of free pins is not an issue).
Are there any other options for this? (protocols, pre-made libraries for serial communication, etc). I'm trying not to re-invent the wheel..
Thank you for your time!