communication module

class communication.Communication

Bases: object

[This class is an API for the GSM class]

call(number)

[Method that performs a call to another number]

Parameters

number ([str]) – [Phone number to call]

call_ongoing()

[Method that checks if a phone call is ongoing]

Returns

  • True -> an active call is ongoing

  • False -> there is not active call ongoing

Return type

[bool]

check_received_SMS()

[Method that checks if the SIM inserted in the GPS module had received any text messages. If any text messages were received, they are printed to the console]

get_location()

[Method that retrieves location details such as:

  • [Longitute]

  • [Latitude]

  • [Altitude]

  • [Course]

  • [GPS Satellites]

  • [GNSS Satellites]

  • [Movement Speed]

  • [Others]

The method transforms the longitude and latitude into the corresponding address ]

Returns

[Address according to the longitude and latitude]

Return type

[str]

send_SMS(sender: str, receiver: str, message: str)

[Method that sends and a text message, from the GSM hat module to a certain phone number]

Parameters
  • sender (str) – [Name of the sender]

  • receiver (str) – [Phone number of the receiver]

  • message (str) – [Text message]

start_GPS()

[Method that activates the GPS]