Skip to content

Latest commit

 

History

History
90 lines (69 loc) · 2.58 KB

File metadata and controls

90 lines (69 loc) · 2.58 KB

Documentation

Main page

  1. Schematic
  2. Communication

Communication

ESP-01S creates WiFi access point to which the device connects and starts telnet server to communicate. You can change SSID and password of AP as well as telnet server IP and port in the beginning of main.cpp in SmartRoom.WiFi project.

Default values
Property Value
SSID Smart Room
Password donteventry
Sever IP 192.168.4.1
Port 23

GET package

GET package allows you to get a value of a pin or text data

Bit Description
1 Bit is set to 0
2-3 Receiver:
0 - Arduino pin
1 - TLC pin
2 - ID (set in Arduino)
3 - [NULL]
4-8 Pin/ID number (0-31)

Example:
0b00100001 - Get value from Arduino pin 1(D1)
0b00000110 - Get value from TLC pin 6


SET package

SET package allows you to set a value of a pin

Bit Description
1 Bit is set to 1
2 Receiver:
0 - Arduino pin
1 - TLC pin
3 Fade:
0 - false
1 - true
4-8 Pin/ID number (0-31)
9-16 Value (0-255)

Example:
0b10100001 0b11001100 - Set value of Arduino pin 1(D1) to 204
0b10000110 0b00001111 - Set value of TLC pin 6 to 15


Feedback package

Feedback package is always sent from the controller to the device when received data

Bit Description
1 Type:
0 - Value
1 - Text
2-3 Receiver:
0 - Arduino pin
1 - TLC pin
2 - ID (set in Arduino)
3 - End of Transmission
4-8 Pin/ID number (0-31)
9+ Value or ASCII (8bit)

Text transmission always need to be ended with ASCII 0x03
When device ended processing/transmitting, it sends EOT 0b01100000

Example:
0b00100011 0b00011111 0b01100000 - Value of TLC pin 3 is 31
0b1100010 0b01001111 0b01101011 0b00000011 0b01100000 - Text of ID 2 is "Ok"


Special packages

Binary Hex Dec Description Usage
0b01100000 0x60 96 End of transmission Ends every transmission
0b11100000 0xE0 224 Ping package Checks if client is available
0b00000011 0x03 3 End of text Ends every text transmission