@@ -40,8 +40,8 @@ the exception of the on-board LED which needs to be accessed with the
4040The built-in object ` WioLTE ` provides useful functionality:
4141
4242```
43+ WioLTE.setLEDPower(true);
4344WioLTE.LED(r,g,b); // Output a color on the LED (values range 0..255)
44- WioLTE.setGrovePower(true); // Enable power to Grove sockets
4545```
4646
4747There are also built-in variables for each of the [ Grove] ( /Grove )
@@ -79,6 +79,27 @@ The SD card can be accessed with [Espruino's normal File IO](/File+IO).
7979However you must be careful not to use it less than 4 seconds before
8080power-on, as the SD card will not have initialised by that point.
8181
82+ ```
83+ var fs = require('fs');
84+
85+ // Init SDCard
86+ WioLTE.init;
87+
88+ var test = function() {
89+ // List files
90+ console.log('List files on root path:\r\n', fs.readdirSync());
91+ // Write file
92+ fs.writeFileSync("hello.txt", "Hello World");
93+ // read file
94+ console.log(fs.readFileSync("hello.txt"));
95+ // append file
96+ fs.appendFileSync("hello.txt", "!!!");
97+ // read again
98+ console.log(fs.readFileSync("hello.txt"));
99+ };
100+
101+ setTimeout(test, 4000);
102+ ```
82103
83104Using LTE and GPS
84105-----------------
@@ -179,7 +200,7 @@ board = require('wiolte').connect(function(err) {
179200```
180201
181202Functionality provided is:
182-
203+ * ` debug(boolean, boolean) ` - choose debug level
183204* ` reset(callback) ` - Reset LTE
184205* ` init(callback) ` - Initialise LTE
185206* ` getVersion(callback) ` - returns LTE firmware version
@@ -196,3 +217,5 @@ Functionality provided is:
196217 * ` answer(callback) `
197218 * ` hangup(callback) `
198219 * ` handleRing(boolean) ` - if trie, will call any function added with ` board.on('RING', ...) `
220+ * ` sleep(callback) ` - LTE modem get into sleep mode, it can save about 100mA
221+ * ` wake(callback) ` - LTE modem wake up from sleep mode
0 commit comments