TiLDA MK4/sim800

From EMF Badge
Revision as of 11:56, 29 August 2018 by Alistair (talk | contribs) (Started documenting the SIM800 library)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The badge makes use of 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 uGFX documentation for more details.


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 for received unread messages (default), 1 for Received read messages,2 for Stored unsent messages, 3 for Stored sent messages, 4 for All message

File System

Bluetooth

Callbacks