Building apps using Thunkable that is similar to MIT app inventor, how to POST / write continuous data to Thingspeak for visualization & analysis using the API link?

9 visualizaciones (últimos 30 días)
I'm doing school project right now, building an app using the Thunkable (free version). So the process is that app will send the continuous data detected by the phone gyroscope/accelerator sensors by using the POST api link formatting to ThingspeakxMatlab(free version) for data visualization and analysis, that the data detected by the phone sensor through the app will be compared with a set of data so that the Thingspeak will classify the conditions of the users.
I tried to post the data from the app to Thingspeak in many ways but it doesn't work. Is there steps I have done wrong? How should I write the api link to send the data to Thingspeak? Should I use different platforms to do my work?

Respuestas (1)

Akanksha
Akanksha el 10 de Jun. de 2025
Hey Marcus HO,
Here are few steps that can help you resolve the query:
  • Set the URL in your API block to: https://api.thingspeak.com/update.
  • Only include Content-Type: application/x-www-form-urlencoded" in the header.
  • Instead of using JSON, use a join block to create a string like: api_key=YOUR_API_KEY&field1=GyroValue1&field2=GyroValue2 where GyroValue1 and GyroValue2are the actual sensor values from your gyroscope or accelerometer blocks.
  • Make sure the method is set to POST in your API block.
Hope these steps will help you. Additionally, try by sending just one field to confirm it works, then add more fields.
PFA the links for further reference
Thanks!

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by