WifiManager()
Main class to sablish and manage WiFi connection with Bittle, using the REST API hosted in included WiFi dongle.
Attributes
ip (str): Bittle ip address.
http_address (str): Bittle REST API address.
Methods
get_status_code(): Returns REST API actionpage (e.g., http://192.168.1.18/actionpage) request code (int). If there is no connection to Bittle REST API, -1 is returned.
has_connection(): Returns True if there is connection to REST API actionpage, False otherwise.
send_msg(msg): Sends passed msg parameter (string) to Bittle. Returns request response (int).
Example
The following example shows the complete process of connecting and sending messages to Bittle through WiFi connection.
Last updated