All Projects → Hieromon → ESP8266

Hieromon / ESP8266

Licence: MIT license
ESP8266 WiFi module Library for Arduino

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to ESP8266

Atc
STM32 LL AT-Command parser
Stars: ✭ 53 (+70.97%)
Mutual labels:  serial, wifi
Heatpump
Arduino library to control Mitsubishi Heat Pumps via connector cn105
Stars: ✭ 327 (+954.84%)
Mutual labels:  serial, wifi
Esp8266 Wifi Uart Bridge
Transparent WiFi (TCP, UDP) to UART Bridge, in AP or STATION mode
Stars: ✭ 107 (+245.16%)
Mutual labels:  serial, wifi
Androbd
Android OBD diagnostics with any ELM327 adapter
Stars: ✭ 573 (+1748.39%)
Mutual labels:  serial, wifi
Esp32 Serial Bridge
Wifi to 3x Serial bridge based on a ESP32
Stars: ✭ 169 (+445.16%)
Mutual labels:  serial, wifi
tuyapower
Python module to read status and energy monitoring data from Tuya based WiFi smart devices. This includes state (on/off), current (mA), voltage (V), and power (wattage).
Stars: ✭ 101 (+225.81%)
Mutual labels:  wifi
alfred-network-location
List, filter and activate network locations from within Alfred
Stars: ✭ 31 (+0%)
Mutual labels:  wifi
stm8s-sdcc-examples
Example codes using sdcc to target STM8S MCUs.
Stars: ✭ 31 (+0%)
Mutual labels:  serial
WiFiPS
WiFi Based Indoor Positioning System, A MVP android Application
Stars: ✭ 105 (+238.71%)
Mutual labels:  wifi
TrialLicensing
Swift framework to deal with licensing and time-based trial periods in macOS apps.
Stars: ✭ 36 (+16.13%)
Mutual labels:  serial
wifi-extender
A WiFi repeater built around Raspberry Pi under 10 US$
Stars: ✭ 64 (+106.45%)
Mutual labels:  wifi
ac controller
WiFi and MQTT enabled air conditioner controller. Features ability to get OTA updates.
Stars: ✭ 12 (-61.29%)
Mutual labels:  wifi
MARIO
Official Repository for ROS-based Manipulator, implemented with ESP32
Stars: ✭ 73 (+135.48%)
Mutual labels:  wifi
uPy-rosserial
An implementation of rosserial for uPy.
Stars: ✭ 19 (-38.71%)
Mutual labels:  serial
DSMRloggerWS
New firmware for the DSMRlogger heavily using WebSockets and Javascript
Stars: ✭ 29 (-6.45%)
Mutual labels:  wifi
ckwin
C-Kermit for Windows - scriptable internet and serial communications with terminal emulation
Stars: ✭ 35 (+12.9%)
Mutual labels:  serial
pycameresp
Motion detection with image notification for Esp32CAM and Esp32 flasher with GUI based on esptool.py.
Stars: ✭ 40 (+29.03%)
Mutual labels:  wifi
wifivoid
Ruby script for continuously jam all wifi clients and access points within range
Stars: ✭ 91 (+193.55%)
Mutual labels:  wifi
makeqr
WiFi QR Code Generator
Stars: ✭ 21 (-32.26%)
Mutual labels:  wifi
Mis-Comandos-Linux
📋 Lista descrita de mis 💯 comandos favoritos ⭐ en GNU/Linux 💻
Stars: ✭ 28 (-9.68%)
Mutual labels:  wifi

ESP8266 WiFi Library for Arduino

ESP8266 library for Arduino that facilitates the implementation of WiFi communication via user sketches.

ESP8266 is a very powerful and 802.11b/g/n protocol based low cost WiFi module. It is contained with a sufficient size of EEPROM and a 32-bit MPU necessary to TCP/IP protocol stack built-in. You can easily build a WiFi device with a serial communication from physical computing boards such as Arduino and Raspberry Pi.

ESP8266 module ESP8266 pinout

ESP8266 WiFi Library for Arduino provides a function for easily WiFi communication using ESP8266 from your sketch via the serial on such as Arduino UNO, Leonardo and MEGA.

Also this library has a debug output facility can monitor the transmitted and received data.

Expamle the sketch

This exmaple sketch sends HTTP1.1 request to url of www.google.co.jp via TCP port 80 and it receives a response.
The first step is join to a WiFi access point, and establish TCP connection with HTTP server. After that, send HTTP request and receive the response from the server. The series of steps will be used ESP8266 class methods.
Actual wiring diagram of this example is the below. In this example, Software Serial is used to output of the response. you connect serial port of your PC to the D8 and D9 by the USB-Serial module such as FT232. ESP8266 Wiring Note: This example uses an 8-pin and 9-pin of Arduino for the received data output to the serial. This signal is different from the serial wiring for ESP8266.

#include "Arduino.h"
#include "ESP8266.h"

#include "SoftwareSerial.h"
SoftwareSerial	ConsoleOut(8, 9);

#define SSID	"MySSID"
#define PWD		"MyPassword"

void setup() {
	char	*ipAddress, ap[31];

	WiFi.reset(WIFI_RESET_HARD);
	WiFi.begin(9600);
	if (WiFi.join(SSID, PWD) == WIFI_ERR_OK) {
		ipAddress = WiFi.ip(WIFI_MODE_STA);
		ConsoleOut.print(F("\n\rIP address:"));
		ConsoleOut.print(ipAddress);
		ConsoleOut.print(':');
		if (WiFi.isConnect(ap))
			ConsoleOut.println(ap);
		else
			ConsoleOut.println(F("not found"));
	} else
		while (1);
}

void loop() {
	if (WiFi.connect((char *)"www.google.co.jp", 80) == WIFI_ERR_CONNECT) {

		if (WiFi.send((const uint8_t *)"GET / HTTP/1.1\r\n\r\n") == WIFI_ERR_OK) {
			int16_t	c;
			uint16_t len = WiFi.listen(10000UL);
			while (len)
				if ((c = WiFi.read()) > 0) {
					ConsoleOut.write((char)c);
					len--;
				}
		} else
			ConsoleOut.println(F("Send fail"));

		WiFi.close();

	} else
		ConsoleOut.println(F("TCP connect fail"));

	WiFi.disconnect();

	while (1);
}

Installation on your arduino IDE

Download a zip file of the ESP8266 library code from Download ZIP and you can import a .zip library in accordance with here methods to your arduino IDE.

How to use ESP8266 WiFi Library for Arduino

ESP8266 Firmware version

Required firmware version. Conformed firmware and the flash writer program could get from the [forum of Espressif]. [forum of Espressif]:http://bbs.espressif.com/viewtopic.php?f=5&t=286 "ESP8266 SDK (esp_iot_sdk_v1.0.0_15_03_20)"

AT version:0.22.0.0
SDK version:1.0.0

Summary

ESP8266 class instance can be referred with the WiFi variable from your sketch by including a ESP8266.h header file.

#include "ESP8266.h"

ESP8266 class has the following functions for controlling the ESP8266 module.

WiFi.reset			// Hardware or software reset for HSP8266 module.
WiFi.begin			// Begin WIFI connection and transmission.
WiFi.end			// End WIFI connection.
WiFi.config			// Configure connection mode and multi connection.
WiFi.join			// Connect to the WiFi access point for the station.
WiFi.disconnect		// Disconnect from the WiFi access point.
WiFi.isConnect		// Inquire the connection establishment status with specified the access point.
WiFi.ip				// Get IP address and report resulted IP address string.
WiFi.status			// Inquire the current WiFi connection status.
WiFi.setup			// Setup access connection topology.
WiFi.connect		// Start the IP connection for client side.
WiFi.server			// Start the IP connection for server side with passive SYN.
WiFi.close			// Close the IP connection.
WiFi.send			// Sending data along with making a connection establishment.
WiFi.receive		// Start listening, and then stores the received data to the buffer.
WiFi.listen			// Starts the listening, and returns data length necessary for receiving.
WiFi.available		// Get the number of bytes available for reading from ESP8266. 
WiFi.read			// Return a character that was received from ESP8266.

Details

See ESP8266 WiFi Library for Arduino wiki page.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].