{"id":21853,"date":"2022-12-22T00:17:54","date_gmt":"2022-12-21T16:17:54","guid":{"rendered":"https:\/\/techclass.wfjydl.com\/?p=21853"},"modified":"2026-04-27T15:57:00","modified_gmt":"2026-04-27T07:57:00","slug":"%e7%94%a8raspberry-pi%e5%92%8csensormedal%e5%88%b6%e4%bd%9ciot%e8%b7%b3%e7%bb%b3%e8%ae%be%e5%a4%87-%e7%ac%ac%e4%b8%89%e9%83%a8%e5%88%86%ef%bc%9a%e8%bf%9e%e6%8e%a5google-drive%ef%bc%8c%e4%bf%9d","status":"publish","type":"post","link":"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/arduino\/arduino-advanced\/raspberrypi-iot-jumprope-device-03\/","title":{"rendered":"\u7528Raspberry Pi\u548cSensorMedal\u5236\u4f5cIoT\u8df3\u7ef3\u8bbe\u5907  \u7b2c\u4e09\u90e8\u5206\uff1a\u8fde\u63a5Google Drive\uff0c\u4fdd\u5b58\u5e76\u67e5\u770b\u8df3\u7ef3\u7ed3\u679c"},"content":{"rendered":"<p>\u7b2c\u4e00\u90e8\u5206\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/arduino\/arduino-advanced\/raspberrypi-iot-jumprope-device-01\/\">\u7528\u8df3\u7ef3\u6d4b\u8bd5\u4eea\u89e3\u51b3\u8fd0\u52a8\u4e0d\u8db3\u95ee\u9898\uff01<\/a><br \/>\n\u7b2c\u4e8c\u90e8\u5206\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/arduino\/arduino-advanced\/raspberrypi-iot-jumprope-device-02\/\">\u7528SensorMedal\u68c0\u6d4b\u8df3\u8dc3\u6b21\u6570\u5e76\u5728\u663e\u793a\u5668\u4e0a\u663e\u793a<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u5927\u5bb6\u597d\uff0c\u6211\u662f\u5409\u7530\uff01<\/p>\n<p>\u672c\u8fde\u8f7d\u65e8\u5728\u5236\u4f5c\u4e00\u6b3e\u7528\u6765\u89e3\u51b3\u8fd0\u52a8\u4e0d\u8db3\u95ee\u9898\u7684\u8df3\u7ef3\u8bbe\u5907\u3002\u672c\u6587\u662f\u7b2c\u4e09\u90e8\u5206\uff0c\u524d\u9762\u5df2\u7ecf\u5b9e\u73b0\u4e86\u901a\u8fc7\u52a0\u901f\u5ea6\u4f20\u611f\u5668\u5bf9\u8df3\u8dc3\u6b21\u6570\u8fdb\u884c\u8ba1\u6570\uff0c\u672c\u6587\u5c06\u4ecb\u7ecd\u5c06\u5176\u6570\u636e\u4fdd\u5b58\u5728Google Sheets\u4e2d\u5e76\u8fdb\u884c\u5904\u7406\u7684\u6b65\u9aa4\u3002\u5982\u679c\u80fd\u591f\u4e86\u89e3\u81ea\u5df1\u7684\u8df3\u8dc3\u6b21\u6570\u3001\u65f6\u95f4\u3001\u6d88\u8017\u7684\u603b\u70ed\u91cf\u7b49\uff0c\u53ef\u80fd\u4f1a\u589e\u52a0\u4eca\u540e\u575a\u6301\u953b\u70bc\u7684\u52a8\u529b\u3002\u73b0\u5728\u5c31\u52a8\u624b\u5f00\u59cb\u505a\u5427\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27150\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-01.jpg\" sizes=\"auto, (max-width: 749px) 100vw, 749px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-01.jpg 749w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-01.jpg 300w\" alt=\"raspberrypi-iot-jumprope-device-03-01\" width=\"749\" height=\"413\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27151\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-02.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-02.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-02.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-02\" width=\"750\" height=\"363\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u672c\u90e8\u5206\u6240\u9700\u90e8\u4ef6<\/h2>\n<h3>\u8df3\u7ef3<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26919\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-03.jpg\" sizes=\"auto, (max-width: 384px) 100vw, 384px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-03.jpg 384w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-03.jpg 294w\" alt=\"raspberrypi-iot-jumprope-device-01-03\" width=\"384\" height=\"392\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>极悦娱乐 SensorMedal\uff08<a href=\"https:\/\/www.chip1stop.com\/product\/detail?partId=极悦娱乐-0171151&amp;mpn=SensorMedal-EVK-002\" target=\"_blank\" rel=\"noopener\">SensorMedal-EVK-002<\/a>\uff09<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26920\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-04.jpg\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-04.jpg 428w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-04.jpg 300w\" alt=\"raspberrypi-iot-jumprope-device-01-04\" width=\"428\" height=\"304\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Raspberry Pi zero\uff08<a href=\"https:\/\/amzn.to\/2YDlNTL\" target=\"_blank\" rel=\"noopener\">Raspberry Pi Zero W<\/a>\uff09<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26921\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-05.jpg\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-05.jpg 400w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-05.jpg 300w\" alt=\"raspberrypi-iot-jumprope-device-01-05\" width=\"400\" height=\"254\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><a href=\"https:\/\/amzn.to\/2ZBgynM\" target=\"_blank\" rel=\"noopener\">FOUR LETTER LED PHAT<\/a><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26922\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-06.jpg\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-06.jpg 428w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-01-06.jpg 300w\" alt=\"raspberrypi-iot-jumprope-device-01-06\" width=\"428\" height=\"176\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u672c\u90e8\u5206\u7684\u6d41\u7a0b<\/h2>\n<ol>\n<li><a href=\"#01\">1.\u8bbe\u7f6e<\/a><\/li>\n<li><a href=\"#02\">2.\u4eceRaspberry Pi\u4e0a\u4f20\u5230Google<\/a><\/li>\n<li><a href=\"#03\">3.\u4fdd\u5b58\u5e76\u663e\u793a\u8df3\u7ef3\u7ed3\u679c<\/a><\/li>\n<li><a href=\"#04\">4.\u603b\u7ed3<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2 id=\"01\">1.\u8bbe\u7f6eGoogle Sheets<\/h2>\n<p>\u5f53\u6211\u4eec\u5b9e\u73b0\u4e86\u8df3\u7ef3\u8ba1\u6570\u540e\uff0c\u5c31\u5f88\u5e0c\u671b\u80fd\u5c06\u6b21\u6570\u7b49\u6570\u636e\u4fdd\u5b58\u4e0b\u6765\uff0c\u4ee5\u4fbf\u968f\u65f6\u67e5\u770b\u4ee5\u5f80\u7684\u8df3\u8dc3\u6b21\u6570\u3002<\/p>\n<p>\u4e3a\u6b64\uff0c\u8ba9\u6211\u4eec\u5c06\u8df3\u8dc3\u6b21\u6570\u7b49\u6570\u636e\u4fdd\u5b58\u5728Google\u4e91\u7aef\u7684\u7535\u5b50\u8868\u683c\u4e2d\u5427\u3002Google\u7684\u4e91\u670d\u52a1\u53ef\u4ee5\u5728\u4e00\u5b9a\u7a0b\u5ea6\u5185\u514d\u8d39\u4f7f\u7528\uff0c\u56e0\u6b64\u53ef\u4ee5\u968f\u65f6\u5f00\u59cb\u4f7f\u7528\u3002<\/p>\n<p>\u9996\u5148\uff0c\u9700\u8981\u8bbf\u95ee\u4e0b\u9762\u7684Google\u63a7\u5236\u53f0\u3002\u5355\u51fb\u4e0b\u9762\u7684\u94fe\u63a5\u53ef\u4ee5\u6ce8\u518c\u60a8\u7684Google\u5e10\u6237\u5e76\u767b\u5f55\u5f00\u59cb\u4f7f\u7528\uff1a<br \/>\n<a href=\"https:\/\/console.developers.google.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/console.developers.google.com\/<\/a><\/p>\n<p>\u60a8Google\u5e10\u6237\u7684\u521d\u59cb\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728\u63a7\u5236\u53f0\u4e2d\u641c\u7d22\u540d\u4e3a\u201cSheets\u201d\u7684API\uff0c\u5c31\u4f1a\u51fa\u6765Google Sheets API\uff0c\u8bf7\u9009\u62e9\u5b83\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27152\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-03.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-03.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-03-300x91.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-03\" width=\"750\" height=\"227\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u73b0\u5728\uff0c\u70b9\u51fb\u5de6\u4fa7\u7684\u84dd\u8272\u6309\u94ae\u201c\u542f\u7528\u201d\uff0c\u542f\u7528Sheets API\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27153\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-04.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-04.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-04-300x124.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-04\" width=\"750\" height=\"310\" \/><\/p>\n<p>&nbsp;<\/p>\n<p> \u7136\u540e\u5c06\u5149\u6807\u79fb\u5230\u5de6\u4fa7\u83dc\u5355\u4e2d\u7684\u201c\u8ba4\u8bc1\u4fe1\u606f\u201d\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27154\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-05.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-05.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-05-300x169.png 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-05-640x360.png 640w\" alt=\"raspberrypi-iot-jumprope-device-03-05\" width=\"750\" height=\"423\" \/><\/p>\n<p>&nbsp;<br \/>\n\u4ece\u8ba4\u8bc1\u9875\u9762\u9876\u90e8\u7684\u201c\u521b\u5efa\u8ba4\u8bc1\u4fe1\u606f\u201d\u4e2d\u9009\u62e9\u201c\u670d\u52a1\u5e10\u6237\u201d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27155\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-06.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-06.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-06-300x106.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-06\" width=\"750\" height=\"264\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u5728\u670d\u52a1\u5e10\u6237\u521b\u5efa\u9875\u9762\u4e0a\uff0c\u8f93\u5165\u9002\u5f53\u7684\u5e10\u6237\u540d\u79f0\u548cID\uff0c\u7136\u540e\u70b9\u51fb\u201c\u521b\u5efa\u201d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27157\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-08.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-08.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-08-300x226.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-08\" width=\"750\" height=\"566\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u5373\u4f7f\u201c\u5141\u8bb8\u8bbf\u95ee\u201d\uff0c\u4e5f\u9700\u8981\u6388\u4e88\u9879\u76ee\u6240\u6709\u8005\u7b49\u6743\u9650\u5e76\u70b9\u51fb\u201c\u7ee7\u7eed\u201d\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27156\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-07.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-07.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-07-300x226.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-07\" width=\"750\" height=\"566\" \/><\/p>\n<p>&nbsp;<\/p>\n<p> \u8fd9\u6837\uff0c\u5c31\u521b\u5efa\u4e86\u670d\u52a1\u5e10\u6237\u3002\u73b0\u5728\uff0c\u5355\u51fb\u5982\u4e0b\u6240\u793a\u7684\u521b\u5efa\u79d8\u94a5\u6309\u94ae\uff0c\u4e0b\u8f7dJSON\u683c\u5f0f\u7684\u6587\u4ef6\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27158\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-09.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-09.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-09-300x38.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-09\" width=\"750\" height=\"96\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27159\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-10.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-10.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-10-300x134.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-10\" width=\"750\" height=\"334\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u4e0b\u8f7d\u597dJSON\u6587\u4ef6\u540e\u6253\u5f00\uff0c\u4fdd\u5b58\u90ae\u4ef6\u4fe1\u606f\u201cxxx@yyy.iam.gserviceaccount.com\u201d\u7684\u5730\u5740\u3002\u53e6\u5916\uff0c\u5c06\u8fd9\u4e2aJSON\u6587\u4ef6\u53d1\u9001\u7ed9Raspberry Pi\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27160\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-11.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-11.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-11.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-11\" width=\"750\" height=\"110\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u8fd9\u4e9b\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u8f6c\u5230 Google Sheets\u5e76\u5c1d\u8bd5\u521b\u5efa\u7535\u5b50\u8868\u683c\u3002\u53ef\u4ee5\u8bbf\u95eeGoogle Drive\u6216\u4f7f\u7528\u4e0b\u9762\u7684\u94fe\u63a5\uff1a<br \/>\n<a href=\"https:\/\/docs.google.com\/spreadsheets\/create\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.google.com\/spreadsheets\/create<\/a><\/p>\n<p>\u65b0\u5efa\u7684Google Sheets\u8868\u683c\u6253\u5f00\u540e\uff0c\u5728\u5de6\u4e0a\u89d2\u7684\u540d\u79f0\u4f4d\u7f6e\u8f93\u5165\u9002\u5f53\u7684\u8868\u683c\u540d\u79f0\u3002\uff08\u6211\u8bbe\u7f6e\u7684\u662f\u201cJump_Count\u201d\uff09<\/p>\n<p>\u7136\u540e\u70b9\u51fb\u53f3\u4fa7\u7684\u201c\u5206\u4eab\u201d\u6309\u94ae\uff0c\u8f93\u5165\u4e4b\u524d\u4fdd\u5b58\u7684\u8d26\u53f7\u4fe1\u606f\uff08xxx@yyy.iam.gserviceaccount.com\uff09\uff0c\u5b8c\u6210\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27161\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-12.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-12.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-12-300x79.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-12\" width=\"750\" height=\"197\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"02\">2. \u4eceRaspberry Pi\u4e0a\u4f20\u5230Google<\/h2>\n<p>\u73b0\u5728\uff0cGoogle\u8fd9\u8fb9\u7684\u8bbe\u7f6e\u5df2\u7ecf\u5b8c\u6210\uff0c\u8ba9\u6211\u4eec\u4eceRaspberry Pi\u5f00\u59cb\u4f7f\u7528\u5427\u3002\u542f\u52a8Raspberry Pi\u5e76\u6253\u5f00\u7ec8\u7aef\u3002<\/p>\n<p>\u8981\u60f3\u4f7f\u7528Google Sheets\uff0c\u9700\u8981\u5404\u79cd\u8ba4\u8bc1\u548c\u4f7f\u7528\u540d\u4e3a\u201cgspread\u201d\u7684\u5e93\uff0c\u56e0\u6b64\u8bf7\u6309\u5982\u4e0b\u65b9\u5f0f\u5b89\u88c5\u3002<\/p>\n<pre class=\"brush: cpp; title: Code-Example; notranslate\" title=\"Code-Example\">pi@raspizero:~\/Programs $ sudo pip3 install oauth2client\r\npi@raspizero:~\/Programs $ sudo pip3 install httplib2\r\nLooking in indexes: https:\/\/pypi.org\/simple, https:\/\/www.piwheels.org\/simple\r\nCollecting httplib2\r\nDownloading     100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 102kB\r\nInstalling collected packages: httplib2\r\n\r\npi@raspizero:~\/Programs $ sudo pip3 install gspread\r\n<\/pre>\n<p>\u73b0\u5728\u53ef\u4ee5\u5c06\u6570\u636e\u4fdd\u5b58\u5728Sheets\u4e2d\u4e86\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u521b\u5efa\u4e86\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u7528\u6765\u4eceRaspberry Pi\u8f93\u5165\u6570\u636e\uff0c\u7a0b\u5e8f\u5982\u4e0b\uff1a<\/p>\n<pre class=\"brush: cpp; title: Code-Example; notranslate\" title=\"Code-Example\">pi@raspizero:~\/Programs $ sudo vi spreadsheet.py\r\n\r\n---------\r\n \r\n#!\/usr\/bin\/python\r\n# -*- coding: utf-8 -*-\r\nimport gspread\r\nfrom oauth2client.service_account import ServiceAccountCredentials\r\n\r\nkey_name = \u2018xxx.json\u2019 # Use your own information\r\nsheet_name = 'jump_count'\r\n\r\n# Use sheets API\r\nscope = ['https:\/\/spreadsheets.google.com\/feeds','https:\/\/www.googleapis.com\/auth\/drive']\r\ncredentials = ServiceAccountCredentials.from_json_keyfile_name(key_name, scope)\r\ngc = gspread.authorize(credentials)\r\n\r\n# Enter TEST to Sell A1\r\ncell_number = 'A1'\r\ninput_value = 'Total Jump'\r\nwks = gc.open(sheet_name).sheet1\r\nwks.update_acell(cell_number, input_value)\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5f53\u8fd0\u884c\u8fd9\u4e2a\u7a0b\u5e8f\u65f6\uff0c\u201cJump Data\u201d\u7684\u6570\u636e\u4f1a\u4eceRaspberry Pi\u88ab\u63d2\u5165\u5230\u4e91\u8868\u683c\u4e2d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27162\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-13.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-13.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-13-300x146.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-13\" width=\"750\" height=\"365\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"03\">3. \u8df3\u7ef3\uff06\u4fdd\u5b58\u3001\u663e\u793a\uff01<\/h2>\n<p>\u73b0\u5728\u8ba9\u6211\u4eec\u4fee\u6539\u8df3\u7ef3\u7a0b\u5e8f\uff0c\u4ee5\u8ba9\u8df3\u8dc3\u6b21\u6570\u53ef\u4ee5\u4e0a\u4f20\u5230Google\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27163\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-14.jpg\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-14.jpg 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-14.jpg 300w\" alt=\"raspberrypi-iot-jumprope-device-03-14\" width=\"750\" height=\"493\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u9996\u5148\u9700\u8981\u8bb0\u5f55\u4e0b\u60a8\u7684\u8868\u683c\u7684sheet_id\uff08\u4e0b\u9762\u7f51\u5740\u4e2d\u7ea2\u6846\u5185\u7684\u90e8\u5206\uff09\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27164\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-15.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-15.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-15-300x68.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-15\" width=\"750\" height=\"171\" \/><\/p>\n<p>&nbsp;<\/p>\n<p> \u5728\u7535\u5b50\u8868\u683c\u4e2d\uff0c\u65e5\u671f\u548c\u65f6\u95f4\u4fdd\u5b58\u5728A\u5217\u548cB\u5217\u4e2d\uff0c\u8df3\u8dc3\u6b21\u6570\u4fdd\u5b58\u5728C\u5217\u4e2d\uff0c\u8df3\u7ef3\u65f6\u95f4\uff08\u79d2\uff09\u4fdd\u5b58\u5728D\u5217\u4e2d\uff0c\u5361\u8def\u91cc\u6d88\u8017\u91cf\u4fdd\u5b58\u5728E\u5217\u4e2d\u3002\u5f53\u5728\u8868\u683c\u7684C1\u3001D1\u548cE1\u8f93\u5165\u6c42\u548c\u547d\u4ee4\u65f6\uff0c\u5c31\u4f1a\u81ea\u52a8\u8ba1\u7b97\u8df3\u8dc3\u7684\u603b\u6b21\u6570\u548c\u6d88\u8017\u7684\u5361\u8def\u91cc\u603b\u91cf\u7b49\u6570\u636e\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27165\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-16.png\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-16.png 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/12\/raspberrypi-iot-jumprope-device-03-16-300x233.png 300w\" alt=\"raspberrypi-iot-jumprope-device-03-16\" width=\"750\" height=\"582\" \/><\/p>\n<p>&nbsp;<\/p>\n<p> \u63a5\u4e0b\u6765\uff0c\u901a\u8fc7\u5728ble_jump_4d.py\u7a0b\u5e8f\u4e2d\u6dfb\u52a0\u7684\u65b9\u5f0f\uff0c\u521b\u5efable_jump_4d_sheets.py\u7a0b\u5e8f\u3002\u4e3a\u4e86\u5c06\u8df3\u8dc3\u6b21\u6570\u4fdd\u5b58\u5728Google Sheets\u4e2d\uff0c\u9700\u8981\u6dfb\u52a0\u4ee5\u4e0b\u90e8\u5206\uff1a<\/p>\n<ul>\n<li>\u7b2c9\u301c42\u884c<\/li>\n<li>\u7b2c49\u301c50\u884c<\/li>\n<li>\u7b2c57\u301c69\u884c<\/li>\n<li>\u7b2c76\u301c77\u884c<\/li>\n<\/ul>\n<pre class=\"brush: cpp; title: Code-Example; notranslate\" title=\"Code-Example\">pi@raspizero:~\/Programs $ sudo cp ble_jump_4d.py ble_jump_4d_sheets.py\r\n\r\n--- \u4e0b\u9762\u7684\u66f4\u6539\u6216\u6dfb\u52a0\u90e8\u5206\u7528\u9ec4\u8272\u8868\u793a ---\r\n#!\/usr\/bin\/env python3\r\n# coding: utf-8\r\n\r\n---\r\n\r\nimport gspread\r\nfrom apiclient import discovery\r\nfrom oauth2client.service_account import ServiceAccountCredentials\r\nimport httplib2\r\nimport numpy as np\r\nfrom datetime import datetime\r\n\r\nkey_name   = \"xxx.json\" # Use your JSON file name\r\nsheet_name= \u201cjump_count\u201d # Sheet name \r\nsheet_id      = \u201czzz\u201d # Sheet Id\r\n\r\nclass SpreadSheet(object):\r\n  def __init__(self, sheet_id):\r\n    self.sheetId = sheet_id\r\n    scope = ['https:\/\/spreadsheets.google.com\/feeds','https:\/\/www.googleapis.com\/auth\/drive']\r\n    credentials = ServiceAccountCredentials.from_json_keyfile_name(key_name, scope)\r\n    http_auth = credentials.authorize(httplib2.Http())\r\n    discoveryUrl = ('https:\/\/sheets.googleapis.com\/$discovery\/rest?''version=v4')\r\n    self.service = discovery.build('sheets', 'v4', http=http_auth, discoveryServiceUrl=discoveryUrl)\r\n\r\n  def append(self, values): # Append data in Google Sheets\r\n    assert np.array(values).shape==(5,) , \"The shape of value %s must be 5\" % (np.array(values).shape)\r\n    value_range_body = {'values':[values]}\r\n    result = self.service.spreadsheets().values().append(spreadsheetId=self.sheetId, \r\n        range=APPEND_RANGE, valueInputOption='USER_ENTERED', body=value_range_body).execute()\r\n    print(result)\r\n\r\nspread_sheet = SpreadSheet(sheet_id) \r\nAPPEND_RANGE = 'sheet1!A1:E1'\r\nstart_time= datetime.now()\r\nlast_time = datetime.now()\r\nlast_cnt  = 0\r\nlast_cal  = 0\r\nlast_dur  = 0\r\n\r\nscanner = btle.Scanner()\r\nwhile True:\r\n\r\n---\r\n\r\n    fourletterphat.print_str(\"JUMP\")\r\n    fourletterphat.show()\r\n\r\n---\r\n                SEQ = sensors['SEQ']\r\n                jump_cnt = sensors['Steps']\r\n                if SEQ in [255,0,1] and jump_cnt == 0:\r\n                    start_seq+= 1\r\n                    start_time= datetime.now()\r\n                    print(start_time.strftime('%H:%M:%S')+\" Start Jumping!\")\r\n                    if last_cnt!=0:\r\n                        spread_sheet.append([last_time.strftime('%Y\/%m\/%d'), last_time.strftime('%H:%M:%S'), \r\n                            last_cnt, last_dur, last_cal])\r\n                else:\r\n                    last_time= start_time\r\n                    last_cnt = jump_cnt\r\n\r\n                cur_time= datetime.now()\r\n                if start_seq &gt;= 1:\r\n                    dur_time= cur_time - start_time\r\n                    dur_seconds = dur_time.seconds \r\n                    cur_cnt = jump_cnt\r\n                    cur_cal = round(cur_cnt*0.1,1)\r\n                    jump_text= str(cur_cnt)+\" Jump \"+str(cur_cal)+\" Cal \"+str(dur_seconds)+\" s\"\r\n                    print(jump_text)\r\n                    fourletterphat.print_number_str(cur_cnt)\r\n                    fourletterphat.show()\r\n                    last_dur = dur_seconds\r\n                    last_cal = cur_cal\r\n\r\n                '''\r\n                for key, value in sorted(sensors.items(), key=lambda x:x[0]):\r\n                    print('    ',key,'=',value)\r\n                '''\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u8ba9\u6211\u4eec\u8fd0\u884c\u8fd9\u4e2a\u7a0b\u5e8f\uff0c\u6309\u4e0bSensorMedal\u4e0a\u7684\u6309\u94ae\u540e\u8df3\u51e0\u4e0b\u5427\u3002 <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27166\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-17.jpg\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-17.jpg 750w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/raspberrypi-iot-jumprope-device-03-17.jpg 300w\" alt=\"raspberrypi-iot-jumprope-device-03-17\" width=\"750\" height=\"561\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u5728\u6709\u7f51\u7edc\u7684\u5730\u65b9\uff0c\u6bcf\u6b21\u6309\u4e0b\u6309\u94ae\u5e76\u8df3\u7ef3\uff0c\u90fd\u4f1a\u5c06\u6b21\u6570\u4fdd\u5b58\u4e0b\u6765\u3002 \u6211\u4eec\u8bbe\u8ba1\u7684\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u6210\u529f\u5730\u5c06\u8df3\u8dc3\u6b21\u6570\u4fdd\u5b58\u5728\u8868\u683c\u4e2d\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>4. \u603b\u7ed3<\/h2>\n<p>\u5728\u672c\u8fde\u8f7d\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528Raspberry Pi\u548cSensorMedal\u5b9e\u73b0\u4e86\u8fde\u63a5\u7269\u8054\u7f51\u7684\u6570\u5b57\u5316\u8df3\u7ef3\u3002<\/p>\n<p>\u672c\u6587\u662f\u7b2c\u4e09\u90e8\u5206\uff0c\u6211\u4eec\u4e0d\u4ec5\u5b9e\u73b0\u4e86\u6b21\u6570\u8ba1\u6570\uff0c\u800c\u4e14\u8fd8\u6210\u529f\u5730\u5c06\u6bcf\u6b21\u8df3\u7ef3\u7684\u6b21\u6570\u7b49\u6570\u636e\u4e0a\u4f20\u5230Google Sheets\u4ee5\u4fdd\u5b58\u7ed3\u679c\u3002Google Sheets\u5f88\u5bb9\u6613\u83b7\u5f97\u5408\u8ba1\u503c\u548c\u7ed8\u5236\u56fe\u8868\uff0c\u56e0\u6b64\u975e\u5e38\u9002\u5408\u968f\u65f6\u67e5\u770b\u8df3\u7ef3\u7ed3\u679c\u3002<br \/>\n\u5728\u4e0b\u4e00\u90e8\u5206\u4e2d\uff0c\u4e5f\u5c31\u662f\u6700\u540e\u4e00\u90e8\u5206\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u8df3\u8dc3\u6b21\u6570\u548c\u4fdd\u5b58\u7684\u6570\u636e\u6765\u521b\u5efa\u4e00\u79cd\u673a\u5236\uff0c\u8ba9\u8df3\u7ef3\u53d8\u5f97\u66f4\u52a0\u6709\u8da3\u4e5f\u66f4\u52a0\u6709\u52a8\u529b\uff0c\u656c\u8bf7\u671f\u5f85\uff01<\/p>\n<div class=\"product_link_box\">\n<span style=\"font-size: 12pt;\"><strong>\u672c\u7cfb\u5217\u8fde\u8f7d\u4e00\u89c8<\/strong><\/span><\/p>\n<p>\u7b2c\u4e00\u90e8\u5206\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/arduino\/arduino-advanced\/raspberrypi-iot-jumprope-device-01\/\">\u7528\u8df3\u7ef3\u6d4b\u8bd5\u4eea\u89e3\u51b3\u8fd0\u52a8\u4e0d\u8db3\u95ee\u9898\uff01<\/a><br \/>\n\u7b2c\u4e8c\u90e8\u5206\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/arduino\/arduino-advanced\/raspberrypi-iot-jumprope-device-02\/\">\u7528SensorMedal\u68c0\u6d4b\u8df3\u8dc3\u6b21\u6570\u5e76\u5728\u663e\u793a\u5668\u4e0a\u663e\u793a<\/a><br \/>\n\u7b2c\u4e09\u90e8\u5206\uff1a\u8fde\u63a5Google Drive\uff0c\u4fdd\u5b58\u5e76\u67e5\u770b\u8df3\u7ef3\u7ed3\u679c(\u672c\u7ae0)<br \/>\n\u7b2c\u56db\u90e8\u5206\uff1a<a href=\"https:\/\/deviceplus.jp\/arduino\/raspberrypi-iot-jumprope-device-04\/\">\u5728\u8bbe\u5907\u4e0a\u5b89\u88c5\u663e\u793a\u5668\u4ee5\u589e\u52a0\u52a8\u529b\uff01<\/a>\n<\/div>\n<div class=\"author-box-wrapper\">\n<div class=\"avatar-wrapper\">\n\t\t<img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2022\/11\/Yoshiken.png\" width=\"128\" height=\"128\" alt=\"\u5409\u7530\u3000\u663e\u4e00\uff08Yoshiken\uff09\">\n\t<\/div>\n<div class=\"desc-wrapper\">\n<h5>\u5409\u7530\u3000\u663e\u4e00\uff08Yoshiken\uff09<\/h5>\n<div class=\"desc\">\n<p>\u5728\u666e\u901a\u516c\u53f8\u5de5\u4f5c\u7684\u4e0a\u73ed\u65cf\uff0c\u975e\u5e38\u559c\u6b22\u521b\u4f5c\u7684\u5468\u672b\u521b\u5ba2\uff0c\u51fa\u7248\u4e86\u7535\u5b50\u4e66MESHBOOK\uff0c\u5e73\u65f6\u4e5f\u5199\u5199\u535a\u5ba2\u3002<br \/>\nhttp:\/\/blog.ktrips.net\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\u7b2c\u4e00\u90e8\u5206\uff1a\u7528\u8df3\u7ef3\u6d4b\u8bd5\u4eea\u89e3\u51b3\u8fd0\u52a8\u4e0d\u8db3\u95ee\u9898\uff01 \u7b2c\u4e8c\u90e8\u5206\uff1a\u7528SensorMedal\u68c0\u6d4b\u8df3\u8dc3\u6b21\u6570\u5e76\u5728\u663e\u793a\u5668\u4e0a\u663e\u793a &nbsp; \u5927\u5bb6\u597d\uff0c\u6211\u662f\u5409\u7530\uff01 \u672c\u8fde\u8f7d\u65e8\u5728\u5236\u4f5c\u4e00\u6b3e\u7528\u6765\u89e3\u51b3\u8fd0\u52a8\u4e0d\u8db3\u95ee\u9898\u7684\u8df3\u7ef3\u8bbe\u5907\u3002\u672c\u6587\u662f\u7b2c\u4e09\u90e8\u5206\uff0c\u524d\u9762\u5df2\u7ecf\u5b9e\u73b0\u4e86 [&hellip;]","protected":false},"author":4,"featured_media":21933,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1977],"tags":[],"class_list":["post-21853","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino-advanced"],"acf":[],"wps_subtitle":"","_links":{"self":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/21853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/comments?post=21853"}],"version-history":[{"count":10,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/21853\/revisions"}],"predecessor-version":[{"id":29582,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/21853\/revisions\/29582"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media\/21933"}],"wp:attachment":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media?parent=21853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/categories?post=21853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/tags?post=21853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}