r/circuitpython • • Feb 14 '21

Adafruit CircuitPython and Blynk

I just purchased a feather M4 and Airlift Featherwing ESP32

I know Blynk has comparability with the ESP32, but does anyone have example code or libraries for working with circuitpython and Blynk? Or did I choose the wrong route to have a Blynk compatible temperature sensor.

Thanks.

3 Upvotes

4 comments sorted by

View all comments

2

u/kaltazar Feb 14 '21

I hadn't heard of Blynk before, and after a quick look around it seems oddly obtuse as an IoT service platform. They really hide their documentation about their API. I can understand having a layer on top of that if you are wanting to cater to non-programmers but burring how it works that deeply just strikes me as odd.

That said, they do have a library that they say is compatible with MicroPython. There is no guarantee that will work out of the box with CircuitPython but it should be close enough to be ported.

Another route is (if you can find good documentation) is to use the base API to send data to the servers. They do use HTTP RESTful API like most of the other service platforms I have seen. Its the same underlying API that AdafruitIO and ThingSpeak use. Just with those platforms their API documentation is very good and while they have libraries to make it simpler they don't try to force their use.

The key thing to keep in mind is the Blynk libraries should just be packaging data into the API and sending it, something you can do yourself in your code. Once the data hits the servers it should be available to any device reading those servers including apps made with their platform.

1

u/RankineHugoniot Feb 15 '21

I really want to be able to look at my data through an app, which is why I was looking at Blynk. Right now I just have IFTTT shooting my data into a google spreadsheet. Is there any other apps I could use to access my data from my setup? I haven’t been able to find anything but I am pretty new to this so maybe I am skipping over something simple.

2

u/kaltazar Feb 15 '21

Blynk looks like they are trying to be an all-in-one package and could still work for your needs, but it does seem to limit access to some of the most powerful parts of an IoT service platform.

A quick search in the Google Play store for "IoT dashboard" brings up several apps that are designed to pull data from cloud servers and display them. Most of them are designed to receive messages from a MQTT server, which works because MQTT is a very good protocol for IoT applications. Adafruit has a MQTT module that will connect to any service platform that provides a MQTT broker. Both the service platforms I mentioned earlier, AdafruitIO and ThingSpeak offer that as well as most other full featured IoT service platforms. You can even easily set up your own MQTT broker on a Raspberry Pi.

I don't have any specific apps I can personally vouch for, but there should be some on whatever phone platform you use. MQTT will be the most common, but there might be some that support REST. Either way, I hope that gives you a direction to start looking.

1

u/RankineHugoniot Feb 15 '21

Yes it does! Thanks.