"ESP8266HTTPClient" Alternative Library for arduino+esp8266-01

Hello I have a code written for nodemcu in Arduino IDE platform and I want to port it to arduino pro-mini connected with a esp8266-01 module with minimal change.
Original code have #include <ESP8266HTTPClient.h> and #include <ESP8266WiFi.h> since it it on nodemcu and I replaced “ESP8266WiFi” with “WiFiEsp” but I could not find a “ESP8266HTTPClient” replacement library. I tried “ArduinoHttpClient” library but it seems not having all members of “ESP8266HTTPClient”. I get error with “ESP8266HTTPClient” begin(),addHeader(),POST(),getString(),end() functions.

Is there a library that covers ESP8266HTTPClient at all? Or some advices for this work?

Use a Wemos D1 mini pro instead of the couple Arduino + ESP01: you can use the same code as on your NodeMCU (and the same libraries), unless you really need a great deal of IOs.

|500x330

elcrcp: Hello I have a code written for nodemcu in Arduino IDE platform and I want to port it to arduino pro-mini connected with a esp8266-01 module with minimal change.

Am i correct in assuming that you want the pro-mini to master the ESP-01 using AT commands ? what does the code do ? (other than the wifi part) I suspect you'll be better of, just loading the ESP-01 with most of the original code, including all the libraries that it does support, it has less memory than a nodeMCU, but it is basically the same thing. And turn the pro-mini into it's slave to perform the actions for which the ESP-01 lacks hardware (Pins really or SPI)

Use a Wemos D1 mini pro instead of the couple Arduino + ESP01:

then you may as well use a nodeMCU, they are cheaper !

lesept: Use a Wemos D1 mini pro instead of the couple Arduino + ESP01: you can use the same code as on your NodeMCU (and the same libraries), unless you really need a great deal of IOs.

|500x330

Nope, I already was on nodemcu and needed more digital pins and used all pins off pro-mini. So can't port to wemos.

Deva_Rishi: Am i correct in assuming that you want the pro-mini to master the ESP-01 using AT commands ? what does the code do ? (other than the wifi part) I suspect you'll be better of, just loading the ESP-01 with most of the original code, including all the libraries that it does support, it has less memory than a nodeMCU, but it is basically the same thing. And turn the pro-mini into it's slave to perform the actions for which the ESP-01 lacks hardware (Pins really or SPI) then you may as well use a nodeMCU, they are cheaper !

Yes you are correct. I'm driving ESP with AT commands. Thing is, there are many things to control. 5 input buttons, 3 output pins, i2c and spi communication, a hw uart to control and a sw uart for esp. So I can't use ESP as master. I gonna use ESP for http communication, gonna send counts and read replies then write messages to lcd.

elcrcp: So I can't use ESP as master.

Sure you can. Use ESP for all WiFi stuff and to be system master. Establish a serial protocol between it and the Pro Mini which will act as the slave and I/O expander. Or, better yet, use a slave board with multiple H/W Serial so you don't have to mess with Software Serial.

gfvalvo: Sure you can. Use ESP for all WiFi stuff and to be system master. Establish a serial protocol between it and the Pro Mini which will act as the slave and I/O expander. Or, better yet, use a slave board with multiple H/W Serial so you don't have to mess with Software Serial.

I just did a quick search on google and enlightened =) I thought esp8266-01 module could only be used with AT commands over serial.

Ok so yes I can use it as a master then (or a slave, doesn't matter anymore since I can do any serial data transfer between them). Thanks for tips.

elcrcp: Ok so yes I can use it as a master then (or a slave, doesn't matter anymore since I can do any serial data transfer between them). Thanks for tips.

Be aware of the fragility of the ESP-01 with 5v logic levels, i have fried many, though it is possible that this was just the result of an unfortunate choice of communication pins on the Arduino side (i used pins 11 & 12) and in the end have it setup using opto-couplers (PC817) at a fairly low BAUD-rate (9600) This proved to be reliable.

elcrcp: Nope, I already was on nodemcu and needed more digital pins and used all pins off pro-mini. So can't port to wemos.

Then you might want to consider the newcoming ESP32-S2:

ESP32-S2 is a highly integrated, low-power, 2.4 GHz Wi-Fi Microcontroller supporting Wi-Fi HT40 and having 43 GPIOs. Based on an Xtensa® single-core 32-bit LX7 processor, ESP32-S2 can be clocked at up to 240 MHz.

IO Peripherals

  • 43 programmable GPIOs
  • 14 capacitive touch sensing IOs
  • Standard peripherals including SPI, I2C, I2S, UART, ADC/DAC and PWM
  • LCD (8-bit parallel RGB/8080/6800) interface and also support for 16/24-bit parallel
  • Camera interface supports 8 or 16-bit DVP image sensor, with clock frequency of up to 40 MHz
  • Full speed USB OTG support

There are many very complete libraries dealing with Wifi for ESP32.