TiLDA MK4/sim800: Difference between revisions

From EMF Badge
Jump to navigation Jump to search
(Started documenting the SIM800 library)
 
m (Formatting)
Line 1: Line 1:
The badge makes use of [http://ugfx.io uGFX] for providing drawing functions on the LCD. Most of this functionality is available through the micropython interface, and you may wish to browse the [https://wiki.ugfx.io/index.php/Main_Page  uGFX documentation] for more details.




Line 8: Line 7:
=== Call ===
=== Call ===


sim800.call(number)
<code>sim800.call(number)</code>


number = Number to call (str)
number = Number to call (str)
Line 14: Line 13:
=== Answer Incoming Call ===
=== Answer Incoming Call ===


sim800.answer()
<code>sim800.answer()</code>


=== End/Reject Call ===
=== End/Reject Call ===


sim800.hangup()
<code>sim800.hangup()</code>


=== Redial ===
=== Redial ===


sim800.redial()
<code>sim800.redial()</code>


=== Incoming Call Number ===
=== Incoming Call Number ===


sim800.latestnumber()
<code>sim800.latestnumber()</code>


Returns the number of the current caller if ringing. Returns the number of the last caller if not ringing.
Returns the number of the current caller if ringing. Returns the number of the last caller if not ringing.
Line 32: Line 31:
=== Ringing ===
=== Ringing ===


sim800.isringing()
<code>sim800.isringing()</code>


Returns True if ringing.
Returns True if ringing.
Line 40: Line 39:
=== Play DTMF ===
=== Play DTMF ===


sim800.dtmf(number)
<code>sim800.dtmf(number)</code>


Plays DTMF tones on an active call.
Plays DTMF tones on an active call.
Line 50: Line 49:
=== List SMS Messages ===
=== List SMS Messages ===


sim800.listsms(stat)
<code>sim800.listsms(stat)</code>


List available SMS messages.
List available SMS messages.


stat = 0 for received unread messages (default), 1 for Received read messages,2 for Stored unsent messages, 3 for Stored sent messages, 4 for All message
stat;
: 0 = received unread messages (default)
: 1 = Received read messages
: 2 = Stored unsent messages
: 3 = Stored sent messages
: 4 = All message


== File System ==
== File System ==

Revision as of 12:44, 29 August 2018


Overview

Calling

Call

sim800.call(number)

number = Number to call (str)

Answer Incoming Call

sim800.answer()

End/Reject Call

sim800.hangup()

Redial

sim800.redial()

Incoming Call Number

sim800.latestnumber()

Returns the number of the current caller if ringing. Returns the number of the last caller if not ringing.

Ringing

sim800.isringing()

Returns True if ringing.

The sim800.getstatus() also returns 2 when ringing and machine.Pin(machine.Pin.GPIO_SIM_RI, machine.Pin.IN).value() will show the start of the hardware ringer indicator pin. You an also user a callback (documented below) with the call name of "RING".

Play DTMF

sim800.dtmf(number)

Plays DTMF tones on an active call.

number = The number of the tone to play. This can a string of numbers that are played in sequence. Using "," will pause for one second. (int or str)

SMS

List SMS Messages

sim800.listsms(stat)

List available SMS messages.

stat;

0 = received unread messages (default)
1 = Received read messages
2 = Stored unsent messages
3 = Stored sent messages
4 = All message

File System

Bluetooth

Callbacks