We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 45a5736 + 2409429 commit c8e6e1fCopy full SHA for c8e6e1f
examples/pyportal_simpletest.py
@@ -0,0 +1,22 @@
1
+# NOTE: Make sure you've created your secrets.py file before running this example
2
+# https://learn.adafruit.com/adafruit-pyportal/internet-connect#whats-a-secrets-file-17-2
3
+import board
4
+from adafruit_pyportal import PyPortal
5
+
6
+# Set a data source URL
7
+TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
8
9
+# Create the PyPortal object
10
+pyportal = PyPortal(url=TEXT_URL, status_neopixel=board.NEOPIXEL)
11
12
+# Set display to show REPL
13
+board.DISPLAY.show(None)
14
15
+# Go get that data
16
+print("Fetching text from", TEXT_URL)
17
+data = pyportal.fetch()
18
19
+# Print out what we got
20
+print('-'*40)
21
+print(data)
22
0 commit comments