JayLooi / RemoteArduino

Remotely interface with Arduino Uno through ESP8266
10 stars 6 forks source link

What board is selected in Arduino IDE for compiling the hex file? #4

Closed t3ch9 closed 1 year ago

t3ch9 commented 2 years ago

Hello, when I try to compile the sketch with board ESP8266 selected in Arduino IDE, the sketch compiles but no hex file is created. When I compile with board Arduino Uno selected, I get an error.

What is the correct board to select in the Arduino IDE?

JayLooi commented 2 years ago

Hi @t3ch9 ,

The sketch in this repo is for ESP8266, so the board chosen must be using ESP8266 chip. I was using ESPresso Lite V2.0 board, so I chose ESPresso Lite 2.0 in Arduino IDE.

As what I noticed in the compilation logs in Arduino IDE, there is no hex file generated for ESP8266 boards.

May I know why you need a hex file generated from this repo?

Before we make any further discussion on this issue, I would like to make sure that there is no misunderstanding on the demo video at time 0:37. The hex file showed in the demo video is the the one compiled from a sketch targeting Arduino UNO. This hex file will be sent from the Host App to a remotely connected ESP8266 board. The ESP8266 board will then flashed the hex content to the Arduino UNO which is connected with it through UART (as shown in the diagram in the README of this repo).

t3ch9 commented 2 years ago

Thank you for your response.

The PubSubClient library is added to the wifi module (in my case esp8266) via mqtt_esp8266.ino sketch?

Is the esp8266 programmed first and then connected to the arduino uno?

I'm trying to understand the process step-by-step but the blog post and video don't show the entire process. What is the correct process? Thank you for your help in advance.

JayLooi commented 2 years ago

@t3ch9

I am regret for the inconvenience caused by the incompleteness of the blog and video.

The steps below are necessary to enable the OTA and remote printing debug log features:

  1. Open the example sketch of ArduinoRemoteInterface library, and update the highlighted field below.

image

Note: The RESET_PIN is a digital pin number of ESP8266 that connected to the reset of Arduino UNO

  1. Compile the sketch and program to ESP8266.
  2. Connect the ESP8266 with an Arduino UNO as shown in the diagram in README.
  3. Open the Host App and fill in the required information as demonstrated in the video. After that, you can start to perform OTA and remote print log in the Host App.
t3ch9 commented 2 years ago

Thank you for your help.