Ads 468x60px

##EasyReadMore##

13 4月, 2018

thingspeak post 方式

預想是用 ardiuno post 到 thingspeak

可先用 postman 去驗證傳的東西是否正確

可以裝 chome 的外掛
https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?utm_source=chrome-app-launcher-info-dialog

網址填入:

https://api.thingspeak.com/channels/401097/bulk_update.json

401097 //為 channel ID

選 POST →  Bodey → raw → json

json 內容: (要注意只能用 雙引號)

{"write_api_key":"0CVNUJBG4PNVZND3","updates":[{"created_at":"2018-04-11 19:26:26 -0500","field1":20,"field2":20,"field3":20,"field4":10}]}

image

按下 Send 即送出了

image

Write a large number of entries to a channel in JSON format with a single HTTP POST - MATLAB Bulk-Write JSON Data - https://goo.gl/pvYhqu

成功上傳可至下面的網址看到 dash board:
https://thingspeak.com/channels/401097

image

ardiuno post 注意事項

  • 字數要對
  • 內容必需為 json 格式
  • 傳遞成功會顯示 post data

image

post json sample:
  Write a large number of entries to a channel in JSON format with a single HTTP POST - MATLAB Bulk-Write JSON Data - https://goo.gl/pvYhqu

{"write_api_key":"0CVNUJBG4PNVZND3","updates":[{"created_at":"2018-01-30  10:26:2 -0500","field1":100},{"created_at":"2017-01-30 10:26:23 - 0500","field1":1,"field2":2,"field3":3,"field4":4},{"created_at":"2018-01-30  10:26:26 -0500","field1":40,"field2":30,"field3":20,"field4":10}]}

0 意見:

張貼留言

 
Blogger Templates