0

(Circuit/Micro)Python and Adafruit Io
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

(Circuit/Micro)Python and Adafruit Io

by dsblock19 on Wed May 15, 2019 1:19 pm

I have a Raspberry Pi getting sensor data and sending it to Adafruit IO via python.

I needed the Pi so I built a version of the circuit for a feather footprint, but now I can't find any reliable way to use micropython or circuitpython to send the data to Adafruit IO.

My experience so far:
Particle Argon running Circuitpython 4.x - ESP AT control, will, not, work. It picks up my home AP (sometimes) and then just endlessly tries to connect and fails.
(followed this guide: https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32/overview )


Feather HUZZAH ESP8266 running Micropython 1.10 - Connects to wifi, but can't connect to MQTT server (OSError [Errno 103] ECONNABORTED)
(used: https://github.com/miketeachman/micropython-adafruit-mqtt-esp8266)


Feather HUZZAH ESP8266 running Circuitpython 3.x - Module throws an exception (forget which one, but think a variable is not defined)
(used: https://github.com/miketeachman/micropython-adafruit-mqtt-esp8266 again)


I have the code for Arduino, but I just REALLY prefer python. Are there any recommendations for getting the data to Adafruit IO with a microcontroller that runs some form of python?

dsblock19
 
Posts: 7
Joined: Tue Mar 19, 2019 5:57 pm

Re: (Circuit/Micro)Python and Adafruit Io

by brubell on Mon May 20, 2019 10:08 am

The Feather ESP8266 is not supported by the Adafruit CircuitPython Adafruit IO Library, or CircuitPython past 3.x.

Your best bet would be picking up a board with AirLift built in (like the PyPortal or Metro M4 WiFi) or an external AirLift module and follow this guide to use Adafruit IO CircuitPython: https://learn.adafruit.com/adafruit-io- ... cuitpython

brubell
 
Posts: 531
Joined: Fri Jul 17, 2015 10:33 pm

Re: (Circuit/Micro)Python and Adafruit Io

by dsblock19 on Wed May 22, 2019 3:42 pm

Great! That's actually what I ended up doing (Feather M4 Express with Airlift breakout).

It works great, except one thing that is less than ideal: the featherwing adalogger I am using and the tutorial online for airlift both use D10. Is there a way I can (preferably) reassign the SD pin, or (alternatively) switch the airlift's CS pin to something other than D10?

----
brentru response:

Reassigning the SD Pin may be more difficult since it's a featherwing and has "fixed" pins (it'd require cutting the trace). Since you're using a breakout for the AirLift, you'd be better off swapping the AirLift's CS pin. You can use any DigitalIO on the Feather.
Last edited by brubell on Thu May 23, 2019 10:52 am, edited 1 time in total.
Reason: brentru double posted :o

dsblock19
 
Posts: 7
Joined: Tue Mar 19, 2019 5:57 pm

Re: (Circuit/Micro)Python and Adafruit Io

by dsblock19 on Thu May 23, 2019 10:50 am

Thanks so much! Working perfectly and been chugging along for a day now.

dsblock19
 
Posts: 7
Joined: Tue Mar 19, 2019 5:57 pm

Re: (Circuit/Micro)Python and Adafruit Io

by brubell on Thu May 23, 2019 10:52 am

dsblock19 wrote:Thanks so much! Working perfectly and been chugging along for a day now.


Glad to hear it - let us know if you hit any roadbumps along the way and we'll fix 'em.

brubell
 
Posts: 531
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.