You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pin interrupts are supported through ```attachInterrupt```, ```detachInterrupt``` functions.
36
41
Interrupts may be attached to any GPIO pin, except GPIO16. Standard Arduino interrupt
37
42
types are supported: ```CHANGE```, ```RISING```, ```FALLING```.
38
43
39
-
#### shiftIn, shiftOut ####
40
-
#### millis, micros ####
41
-
#### delay, delayMicroseconds, yield ###
44
+
#### Timing and delays ####
45
+
```millis``` and ```micros``` return the number of milliseconds and microseconds elapsed after reset, respectively.
46
+
47
+
```delay``` pauses the sketch for a given number of milliseconds and allows WiFi and TCP/IP tasks to run.
48
+
```delayMicroseconds``` pauses for a given number of microseconds.
42
49
43
50
Remember that there is a lot of code that needs to run on the chip besides the sketch
44
51
when WiFi is connected. WiFi and TCP/IP libraries get a chance to handle any pending
@@ -53,9 +60,11 @@ more than 20 milliseconds is not recommended.
53
60
54
61
#### Serial ####
55
62
56
-
Only 8n1 is supported right now. By default the diagnostic output from WiFi
57
-
libraries is disabled when you call ```Serial.begin```. To enable debug output again,
58
-
call ```Serial.setDebugOutput(true);```
63
+
```Serial``` object works much the same way as on a regular Arduino. Apart from hardware FIFO (128 bytes for TX and RX) HardwareSerial has additional 256-byte TX and RX buffers. Both transmit and receive is interrupt-driven. Write and read functions only block the sketch execution when the respective FIFO/buffers are full/empty.
64
+
65
+
Only 8n1 mode is supported right now.
66
+
67
+
By default the diagnostic output from WiFi libraries is disabled when you call ```Serial.begin```. To enable debug output again, call ```Serial.setDebugOutput(true);```
59
68
60
69
#### WiFi(ESP8266WiFi library) ####
61
70
@@ -81,6 +90,7 @@ Library for calling functions repeatedly with a certain period. Two examples inc
81
90
This is a bit different from standard EEPROM class. You need to call ```EEPROM.begin(size)```
82
91
before you start reading or writing, size being the number of bytes you want to use.
83
92
Size can be anywhere between 4 and 4096 bytes.
93
+
84
94
```EEPROM.write``` does not write to flash immediately, instead you must call ```EEPROM.commit()```
85
95
whenever you wish to save changes to flash. ```EEPROM.end()``` will also commit, and will
86
96
release the RAM copy of EEPROM contents.
@@ -89,8 +99,8 @@ Three examples included.
89
99
90
100
#### I2C (Wire library) ####
91
101
92
-
Only master mode works, and I haven't tested if Wire.setClock gives correct frequency.
93
-
Before using I2C, you need to set pins you will use for SDA and SCL by calling
102
+
Only master mode works, and ```Wire.setClock``` has not been verified to give exactly correct frequency.
103
+
Before using I2C, pins for SDA and SCL need to be set by calling
94
104
```Wire.pins(int sda, int scl)```, i.e. ```Wire.pins(0, 2);``` on ESP-01.
0 commit comments