Use Ameba to retrieve information from the Internet


  • Ameba x 1


In this example, we use Ameba to be a web client to retrieve information from the Internet.
First, make sure the board is set to Ameba, “Tools” -> “Board” -> “Arduino Ameba”
Then open “File” -> “Examples” -> “AmebaWiFi” -> “WiFiWebClient”


In the sample code, modify the highlighted snippet to the corresponding information.

Upload the code, and press the reset button on Ameba. Then you can see the information retrieved from Google is shown in the Arduino IDE.


Code Reference

Use WiFi.begin() to establish WiFi connection:
To get the information of a WiFi connection:
Use WiFi.SSID() to get SSID of the current connected network.
Use WiFi.RSSI() to get the signal strength of the connection.
Use WiFi.localIP() to get the IP address of Ameba.
Use WiFiClient() to create a client.
Use client.connect() to connect to the IP address and port specified.
Use client.println() to print data followed by a carriage return and newline.
Use client.available() to return the number of bytes available for reading.
Use to read the next byte received from the server the client is connected to.
Use client.stop() to disconnect from the server the client is connected to.

Please confirm that QQ communication software is installed