Chat freely about anything...

User avatar
By davydnorris
#91662 As Erik said...

You've built your own minicomputer, and you've attached the ESP8266 to it as a peripheral.

The ESP module is a wifi MCU and quite a powerful one at that. It already has numerous TCP/IP implementations available for it right out of the box:
- you have numerous GPIO ports available to communicate with the ESP unit, including a serial port, I2S, I2C and SPI
- you have a prebuilt flash that turns it into a wifi modem that uses AT commands via its serial port
- you have a NonOS and RTOS SDK that have TCP/IP built in that you can write programs for directly and that you could set up to use any of the above IO methods. If it were me I would probably use SPI
- you have Arduino that uses the NonOS SDK under the hood with a lot of sketches out there that turn the ESP into a wifi peripheral that can be plugged onto things like Raspberry Pi and that use things like serial, SPI and I2S
- you have other environments built on the NonOS or RTOS SDK such as BASIC, Python, JavaScript, Lua

What you need to do is work out how your computer is going to communicate and then you're going to need to write an API yourself:
- if your computer already has code for an IP stack then you probably want to write a device driver that talks low level to the ESP
- if you don't have an IP stack but have userland applications that use something like sockets, then you'll want to write the API at the IP stack level and hook it under the sockets implementation
- if you have no userland then you'll want to write your user applications and have an API that issues comms commands to the ESP