Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cellular Examples #27

Merged
merged 1 commit into from
May 7, 2020
Merged

Add Cellular Examples #27

merged 1 commit into from
May 7, 2020

Conversation

brentru
Copy link
Member

@brentru brentru commented May 5, 2020

Adding examples for using this library with a cellular (adafruit/Adafruit_CircuitPython_FONA#3) interface.

Tested with Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit Metro M4 Express with samd51j19

code.py output:
Attaching to network...
Attaching to network...
..
Connecting to network...
Connecting to network...
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
b'HTTP/1.1 200 OK'
----------------------------------------
Text Response:  This is a test of Adafruit WiFi!
If you can read this, its working :)

----------------------------------------
Fetching JSON data from http://httpbin.org/get
b'HTTP/1.1 200 OK'
----------------------------------------
JSON Response:  {'url': 'http://httpbin.org/get', 'headers': {'User-Agent': 'Adafruit CircuitPython', 'Host': 'httpbin.org', 'X-Amzn-Trace-Id': 'Root=1-5eb1c2c8-eaed6e4c24be7bd6171daee6'}, 'args': {}, 'origin': '172.58.206.207'}
----------------------------------------
POSTing data to http://httpbin.org/post: 31F
b'HTTP/1.1 200 OK'
----------------------------------------
Data received from server: 31F
----------------------------------------
POSTing data to http://httpbin.org/post: {'Date': 'July 25, 2019'}
b'HTTP/1.1 200 OK'
----------------------------------------
JSON Data received from server: {'Date': 'July 25, 2019'}
----------------------------------------
code.py output:
Attaching to network...
...
Connecting to network...
Fetching JSON data from http://httpbin.org/get...
b'HTTP/1.1 200 OK'
------------------------------------------------------------
Response's Custom User-Agent Header: Adafruit CircuitPython,blinka/1.0.0
------------------------------------------------------------
Response HTTP Status Code:  200
------------------------------------------------------------
Raw Response:  b'{\n  "args": {}, \n  "headers": {\n    "Host": "httpbin.org", \n    "User-Agent": "Adafruit CircuitPython,blinka/1.0.0", \n    "X-Amzn-Trace-Id": "Root=1-5eb1c36e-340d6329dbaef4b9710b684f"\n  }, \n  "origin": "172.58.235.170", \n  "url": "http://httpbin.org/get"\n}\n'```

@brentru brentru requested a review from a team May 5, 2020 19:56
@brentru brentru merged commit 41de8b3 into adafruit:master May 7, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 8, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.4.0 from 3.3.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#97 from dearmash/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_GPS to 3.6.3 from 3.6.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_GPS#45 from adafruit/dherrada-patch-2
  > Merge pull request adafruit/Adafruit_CircuitPython_GPS#42 from dherrada/i2c-fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_MSA301 to 1.2.2 from 1.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MSA301#5 from geekguy-wy/needs_renaming_to_match_lib_name
  > Merge pull request adafruit/Adafruit_CircuitPython_MSA301#4 from BiffoBear/rename-example-file

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 3.2.4 from 3.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#81 from kattni/remove-from-pypi

Updating https://github.com/adafruit/Adafruit_CircuitPython_TSL2591 to 1.2.2 from 1.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_TSL2591#17 from adafruit/lux-note

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 2.2.1 from 2.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#32 from brentru/add-cellular

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 1.4.2 from 1.4.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#27 from brentru/add-cellular
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants