.codehilitepre.il{color:#009999}/* Literal.Number.Integer.Long */</style><title>README</title></head><body><articleclass="markdown-body"><h1id="nodemcu-api-instruction"><strong>nodeMcu API Instruction</strong></h1>
<pre><code> -- open 'init.lua', print the first line.
<divclass="codehilite"><pre><spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">open</span><spanclass="w"></span><spanclass="c1">'init.lua', print the first line.</span>
<pre><code> -- open 'init.lua', print the first line.
<divclass="codehilite"><pre><spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">open</span><spanclass="w"></span><spanclass="c1">'init.lua', print the first line.</span>
<divclass="codehilite"><pre><spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">open</span><spanclass="w"></span><spanclass="c1">'init.lua' in 'a+' mode</span>
<spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">write</span><spanclass="w"></span><spanclass="c1">'foo bar' to the end of the file</span>
<divclass="codehilite"><pre><spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">open</span><spanclass="w"></span><spanclass="c1">'init.lua' in 'a+' mode</span>
<spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">write</span><spanclass="w"></span><spanclass="c1">'foo bar' to the end of the file</span>
<divclass="codehilite"><pre><spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">open</span><spanclass="w"></span><spanclass="c1">'init.lua' in 'a+' mode</span>
<spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">write</span><spanclass="w"></span><spanclass="c1">'foo bar' to the end of the file</span>
<p>Sets and gets the file position, measured from the beginning of the file, to the position given by offset plus a base specified by the string whence.</p>
<divclass="codehilite"><pre><spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">open</span><spanclass="w"></span><spanclass="c1">'init.lua' in 'a+' mode</span>
<spanclass="w"></span><spanclass="o">--</span><spanclass="w"></span><spanclass="vg">write</span><spanclass="w"></span><spanclass="c1">'foo bar' to the end of the file</span>
<strong>-Note:</strong> setup pwm frequency will synchronously change others if there are any. Only one PWM frequency can be allowed for the system.</p>
<strong>-Note:</strong> setup pwm frequency will synchronously change others if there are any. Only one PWM frequency can be allowed for the system.</p>
<p>event: string, which can be: “connection”, “reconnection”, “disconnection”, “receive”, “sent”<br/><br/>
<p>event: string, which can be: “connection”, “reconnection”, “disconnection”, “receive”, “sent”<br/><br/>
function cb(net.socket, [string]): callback function. The first param is the socket.<br/><br/>
function cb(net.socket, [string]): callback function. The first param is the socket.<br/><br/>
If event is”receive”, the second param is received data in string.</p>
If event is”receive”, the second param is received data in string.</p>