{"id":11700,"date":"2023-06-10T07:00:48","date_gmt":"2023-06-09T22:00:48","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=11700"},"modified":"2023-06-11T22:40:46","modified_gmt":"2023-06-11T13:40:46","slug":"obniz-%e3%81%a7%e9%9b%bb%e5%ad%90%e5%b7%a5%e4%bd%9c%ef%bc%81%e4%bd%93%e6%84%9f60%e7%a7%92%e3%81%a7%e3%82%b9%e3%83%88%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e3%82%b2%e3%83%bc%e3%83%a0%e3%82%92%e3%81%a4","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=11700","title":{"rendered":"Obniz \u3067\u96fb\u5b50\u5de5\u4f5c\uff01\u4f53\u611f60\u79d2\u3067\u30b9\u30c8\u30c3\u30d7\u3059\u308b\u30b2\u30fc\u30e0\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u306e\u9593\u300c<a href=\"https:\/\/blog.capilano-fw.com\/?p=11516\">\u9769\u65b0\u7684\u306aPython\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff01\u96fb\u5b50\u30da\u30fc\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u5e97\u5185\u3092\u5909\u3048\u308b<\/a>\u300d\u3068\u3044\u3046\u8a18\u4e8b\u3092\u516c\u958b\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u3068\u304d\u306b\u601d\u3063\u305f\u3053\u3068\u304c\u3072\u3068\u3064\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u96fb\u5b50\u5de5\u4f5c\u3063\u3066\u697d\u3057\u3044\u304b\u3082\ud83d\ude04<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u79c1\u306f\u300c\u30af\u30ea\u30a8\u30a4\u30c6\u30a3\u30d6\u30fb\u30e2\u30fc\u30c9\u300d\u306b\u306a\u308b\u3068\u305b\u3063\u304b\u3061\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u8272\u3005\u3068\uff08\u7269\u7406\u7684\u306b\uff09\u6e96\u5099\u3057\u306a\u304f\u3066\u3082\u3059\u3050\u3067\u304d\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u5411\u3044\u3066\u3044\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u3082\u3001\u5e74\u3092\u91cd\u306d\u308b\u3054\u3068\u306b\u5c11\u3057\u305a\u3064\u6027\u683c\u306b\u5909\u5316\u304c\u51fa\u3066\u304d\u305f\u306e\u304b\u3001\u305d\u308c\u3060\u3051\u7528\u610f\u306b\u6642\u9593\u304c\u304b\u304b\u3063\u305f\u5206\u9054\u6210\u611f\u304c\u5927\u304d\u304f\u3082\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u524d\u56de\u3068\u540c\u69d8\u3001\u9577\u3089\u304f\u300c<strong>\u8cb7\u3063\u305f\u306e\u306b\u305d\u306e\u307e\u307e<\/strong>\u300d\u72b6\u614b\u3060\u3063\u305f\u300c<strong>Obniz Starter Kit<\/strong>\uff08\u304a\u3076\u306a\u3044\u305a\u30fb\u3059\u305f\u30fc\u305f\u30fc\u30fb\u304d\u3063\u3068\uff09\u300d\u3092\u4f7f\u3063\u3066\u3061\u3087\u3063\u3068\u3057\u305f\u30b2\u30fc\u30e0\u3092\u4f5c\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11711\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/06\/obniz_60_stop_game_5.jpg\" alt=\"\" width=\"640\" height=\"853\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/06\/obniz_60_stop_game_5.jpg 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/06\/obniz_60_stop_game_5-225x300.jpg 225w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u203b \u3061\u306a\u307f\u306b\u3001<code>Obniz<\/code>\u306f<code>Raspberry Pi<\/code>\u3068\u540c\u3058\u3088\u3046\u306b\u57fa\u76e4\u304c\u305d\u306e\u307e\u307e\u3080\u304d\u51fa\u3057\u306b\u306a\u3063\u3066\u3044\u308b\u300c\u3061\u3044\u3055\u306a\u30d1\u30bd\u30b3\u30f3\u300d\u306a\u306e\u3067\u3059\u304c\u3001\u306a\u3093\u3068\u3072\u3068\u3064\u3072\u3068\u3064\u306b\u500b\u5225\u306eID\u304c\u7d10\u4ed8\u3051\u3089\u308c\u3066\u3044\u3066\u305d\u306eID\u3092\u4f7f\u3063\u3066\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30aa\u30f3\u30e9\u30a4\u30f3\u4e0a\u304b\u3089\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u30b9\u30b0\u30ec\u30e2\u30ce\u3067\u3059\u3002\uff08<code>HTML + JavaScript<\/code>\u3067OK\uff01\uff09<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude04\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6070 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5.png\" alt=\"\" width=\"260\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5.png 260w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5-244x300.png 244w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/>\u300c\u6b21\u306f USB \u3067\u63a5\u7d9a\u3067\u304d\u308b<br \/>\n\u30ac\u30b8\u30a7\u30c3\u30c8\u304c\u307b\u3057\u3044\u306a\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> HTML\u3001JavaScript<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p><code>Obniz Starter Kit<\/code>\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30bb\u30f3\u30b5\u30fc\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>LED\u30de\u30c8\u30ea\u30c3\u30af\u30b9<\/li>\n<li>LED\u4fe1\u53f7<\/li>\n<li>\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u30fc<\/li>\n<li>\u30d6\u30b6\u30fc<\/li>\n<li>\u30dc\u30bf\u30f3<\/li>\n<li>\u6e29\u5ea6\u30bb\u30f3\u30b5\u30fc<\/li>\n<li>\u4eba\u611f\u30bb\u30f3\u30b5\u30fc<\/li>\n<li>\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/li>\n<\/ul>\n<p>\u5f53\u521d\u306f\u3001\u300c<strong>\u30d6\u30b6\u30fc\uff06\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong>\u300d\u3067\u300c\u30c6\u30eb\u30df\u30f3\u300d\u307f\u305f\u3044\u306a\u3082\u306e\uff08\u8ddd\u96e2\u3067\u97f3\u304c\u5909\u308f\u308b\u697d\u5668\uff09\u3092\u3064\u304f\u308a\u305f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u4ed6\u306e\u30d6\u30ed\u30b0\u3055\u3093\u304c\u8a66\u3057\u3066\u3046\u307e\u304f\u3044\u304b\u306a\u304b\u3063\u305f\u3088\u3046\u3067\u3057\u305f\u306e\u3067\u3001\u4eca\u56de\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u300c<strong>\u4f53\u611f\u3067\uff16\uff10\u79d2\u3061\u3087\u3046\u3069\u3067\u30b9\u30c8\u30c3\u30d7\u3059\u308b\u30c1\u30e3\u30ec\u30f3\u30b8<\/strong>\u300d\u7565\u3057\u3066\u300c<strong>\u4f53\u611f\uff16\uff10\u79d2\u30c1\u30e3\u30ec\u30f3\u30b8<\/strong>\u300d\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3059\u2757<\/p>\n<p>\u203b \u305d\u306e\u6614\u3001\u6c7a\u3081\u3089\u308c\u305f\u79d2\u6570\u3092\u4f53\u611f\u3067\u30b9\u30c8\u30c3\u30d7\u3057\u3066\u304a\u91d1\u304c\u3082\u3089\u3048\u308b\u30d0\u30e9\u30a8\u30c6\u30a3\u756a\u7d44\u3042\u308a\u307e\u3057\u305f\u3088\u306d\u3002\u3042\u308c\u306a\u3093\u3067\u3057\u305f\u3063\u3051\u2026\ud83e\udd14<\/p>\n<h1>Obniz \u3092\u958b\u3051\u308b<\/h1>\n<p>\u3067\u306f\u3001\u4eca\u56de\u306f\u5199\u771f\u3082\u64ae\u3063\u305f\u306e\u3067\u300c<strong>\u958b\u5c01\u306e\u5100<\/strong>\u300d\u304b\u3089\u59cb\u3081\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30d1\u30ab\u30c3\u2757<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11702\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_1.jpg\" alt=\"\" width=\"640\" height=\"480\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_1.jpg 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_1-300x225.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306a\u304b\u306b\u306f\u8aac\u660e\u66f8\u3068\u5404\u7a2e\u30bb\u30f3\u30b5\u30fc\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5de5\u4f5c\u597d\u304d\u306a\u4eba\u306f\u3053\u306e\u6642\u70b9\u3067\u30ef\u30af\u30ef\u30af\u3059\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\ud83d\ude09\ud83d\udc4d<\/p>\n<p>\u305d\u3057\u3066\u3001<code>Obniz<\/code>\u672c\u4f53\u3092\u888b\u304b\u3089\u53d6\u308a\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11701\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_2.jpg\" alt=\"\" width=\"853\" height=\"640\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_2.jpg 853w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_2-300x225.jpg 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_2-768x576.jpg 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>\u60f3\u5b9a\u3088\u308a\u3082\u5c0f\u3055\u304f\u3066\u9a5a\u304d\u307e\u3057\u305f\uff08<code>Raspberry Pi<\/code>\u3088\u308a\u3082\u3061\u3044\u3055\u3044\uff01\uff09<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u51b7\u9759\u306b\u8003\u3048\u308b\u3068\u3053\u306e\u3061\u3063\u3061\u3083\u306a<code>Obniz<\/code>\u306e\u65b9\u304c\u6211\u3005\u304c\u5b66\u751f\u306e\u9803\u306b\u3082\u3063\u3066\u305f\u8d85\u9ad8\u984d\u306a\u30ed\u30fc\u30b9\u30da\u30c3\u30af\u30fb\u30ce\u30fc\u30c8\u30d1\u30bd\u30b3\u30f3\u3088\u308a\u6027\u80fd\u304c\u3044\u3044\u3093\u3060\u308d\u3046\u306a\u3001\u3068\u8003\u3048\u308b\u3068\u306a\u3093\u3068\u3082\u8907\u96d1\u306a\u6c17\u6301\u3061\u306b\u306a\u308a\u307e\u3057\u305f\ud83d\ude02<\/p>\n<h1>Obniz \u3092 wifi \u306b\u63a5\u7d9a\u3059\u308b<\/h1>\n<p><code>Obniz<\/code>\u306f\u3001\u5c0f\u3055\u304f\u3066\u3082\u3061\u3083\u3093\u3068<code>wifi<\/code>\u306b\u63a5\u7d9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u3001\u63a5\u7d9a\u65b9\u6cd5\u306f\u4ee5\u4e0b\u306e\u672c\u5bb6\u30b5\u30a4\u30c8\u304c\u3068\u3066\u3082\u5206\u304b\u308a\u3084\u3059\u3044\u306e\u3067\u305d\u3061\u3089\u3092\u53c2\u8003\u306b\u3057\u3066<code>wifi<\/code>\u63a5\u7d9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong> https:\/\/docs.obniz.com\/ja\/reference\/board-1y\/quick-start\/<\/p>\n<h1>Obniz \u306b\u30dc\u30bf\u30f3\u3092\u30bb\u30c3\u30c8\u3059\u308b<\/h1>\n<p><span style=\"font-size: 1rem;\">\u4eca\u56de\u306f\u300c<\/span><strong style=\"font-size: 1rem;\">\u4f53\u611f\uff16\uff10\u79d2\u30c1\u30e3\u30ec\u30f3\u30b8<\/strong><span style=\"font-size: 1rem;\">\u300d\u306a\u306e\u3067\u3001\u3044\u304f\u3064\u304b\u3042\u308b\u30bb\u30f3\u30b5\u30fc\u306e\u4e2d\u304b\u3089\u30dc\u30bf\u30f3\u3060\u3051\u3092\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11704\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_3.jpg\" alt=\"\" width=\"640\" height=\"480\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_3.jpg 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_3-300x225.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u3053\u306e\u30dc\u30bf\u30f3\u306b\u306f\uff13\u3064\u30d4\u30f3\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u300c0\u300d\u300c1\u300d\u300c2\u300d\u306b\u30bb\u30c3\u30c8\u3057\u307e\u3057\u305f\u3002\uff08\ud83d\udc48 \u3053\u3053\u306f\u30b3\u30fc\u30c9\u306b\u3082\u5f71\u97ff\u3059\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<h1>JavaScript\u306e\u30b3\u30fc\u30c9\u3092\u66f8\u304f<\/h1>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u304c\u30d7\u30ed\u30b0\u30e9\u30e0\u90e8\u5206\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><code>Obniz<\/code>\u306b\u96fb\u6e90\u3092\u5165\u308c\u3066<code>wifi<\/code>\u306b\u63a5\u7d9a\u3059\u308b\u3068QR\u30b3\u30fc\u30c9\u304c\u672c\u4f53\u306e\u30d7\u30c1\u30e2\u30cb\u30bf\u30fc\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u3053\u308c\u3092\u30b9\u30de\u30db\u306a\u3069\u3067\u8aad\u307f\u53d6\u3063\u3066\uff08\u30d7\u30ed\u30b0\u30e9\u30e0\u3057\u3084\u3059\u3044\u306e\u3067\uff09PC\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a8\u30c7\u30a3\u30bf\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u3053\u306e\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3057\u307e\u3059\u3002\uff08\u306a\u3093\u3068<code>HTML + JavaScript<\/code>\u3067\u52d5\u304f\u3093\u3067\u3059\u306d\uff01\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11705\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_4.png\" alt=\"\" width=\"640\" height=\"358\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/05\/obniz_60_stop_game_4-300x168.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre><strong>&lt;html&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=\"utf-8\" \/&gt;\r\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/&gt;\r\n    &lt;link\r\n      rel=\"stylesheet\"\r\n      href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.3.1\/css\/bootstrap.min.css\"\r\n    \/&gt;\r\n    &lt;script\r\n      src=\"https:\/\/unpkg.com\/obniz@3.25.0-beta.0\/obniz.js\"\r\n      crossorigin=\"anonymous\"\r\n    &gt;&lt;\/script&gt;\r\n  &lt;\/head&gt;\r\n  &lt;body&gt;\r\n    &lt;div id=\"obniz-debug\"&gt;&lt;\/div&gt;\r\n    &lt;h3&gt;\u3074\u3063\u305f\u308a\u30b9\u30c8\u30c3\u30d7\u30b2\u30fc\u30e0\u3092\u3064\u304f\u308b\u30b5\u30f3\u30d7\u30eb&lt;\/h3&gt;\r\n    \r\n    &lt;script&gt;\r\n      const obnizId = '\uff08\u3053\u3053\u306b\u3042\u306a\u305f\u306e Obniz \u756a\u53f7\uff09';\r\n      const obniz = new Obniz(obnizId);\r\n\r\n      obniz.onconnect = async () =&gt; {\r\n\r\n        \/\/ \u30c7\u30fc\u30bf\r\n        const targetSeconds = 60; \/\/ \u3053\u306e\u79d2\u6570\u3067\u6b62\u3081\u305f\u3089\u30c1\u30e3\u30ec\u30f3\u30b8\u6210\u529f\r\n        let startTime = 0;\r\n        let counter = null;\r\n        let initialized = false;\r\n        let progressText = '';\r\n\r\n        \/\/ \u30dc\u30bf\u30f3\r\n        const button = obniz.wired('Keyestudio_Button', {signal:0, vcc:1, gnd:2});\r\n        button.onchange = (pressed) =&gt; {\r\n\r\n          if(initialized === true &amp;&amp; pressed === true) {\r\n\r\n            if(counter === null) {\r\n\r\n              startTime = Date.now();\r\n              showText(`${targetSeconds}\u79d2\u3067\u6b62\u3081\u308d\u2757`);\r\n\r\n              const randomNumber = getRandomNumber(100, 900);\r\n              counter = setInterval(addSecond, randomNumber); \/\/ \u30e9\u30f3\u30c0\u30e0\u306a\u79d2\u6570\u3067\u7e70\u308a\u8fd4\u3057\u5b9f\u884c\r\n\r\n              console.log('\u958b\u59cb');\r\n\r\n            } else {\r\n              \r\n              \/\/ \u30dd\u30a4\u30f3\u30c8\u8a08\u7b97\r\n              const deltaSeconds = getDeltaSeconds();\r\n              const resultText = (deltaSeconds === targetSeconds)\r\n                ? `\u3074\u3063\u305f\u308a ${targetSeconds}\u79d2\ud83c\udf89\u2728`\r\n                : `\u6b8b\u5ff5\u3001${deltaSeconds}\u79d2\u3067\u3059\ud83d\udca6`\r\n\r\n              showText(resultText);\r\n              clearTimer();\r\n\r\n            }\r\n\r\n          } else {\r\n\r\n            initialized = true;\r\n            showText('\u6e96\u5099 OK \ud83d\ude09\ud83d\udc4c');\r\n\r\n          }\r\n          \r\n        }\r\n\r\n        \/\/ \u30bf\u30a4\u30de\u30fc\r\n        const addSecond = () =&gt; {\r\n\r\n          const deltaSeconds = getDeltaSeconds();\r\n          console.log(deltaSeconds +'\u79d2')\r\n\r\n          if(deltaSeconds &gt; targetSeconds) { \/\/ \u3042\u3089\u304b\u3058\u3081\u6c7a\u3081\u305f\u79d2\u6570\u3092\u8d85\u3048\u305f\u3068\u304d\r\n\r\n            showText('\u30a2\u30a6\u30c8\u2026\ud83d\ude2b');\r\n            clearTimer();\r\n\r\n          } else {\r\n\r\n            const currentDisplayText = getProgressText();\r\n            showText(currentDisplayText);\r\n            \r\n          }\r\n\r\n        };\r\n        const clearTimer = () =&gt; {\r\n          \r\n          clearInterval(counter);\r\n          counter = null;\r\n          startTime = 0;\r\n\r\n          console.log('\u7d42\u4e86');\r\n\r\n        };\r\n        const getDeltaSeconds = () =&gt; {\r\n\r\n          const stopTime = Date.now();\r\n          const deltaMilliSeconds = stopTime - startTime;\r\n\r\n          return Math.round(deltaMilliSeconds * 0.001);\r\n\r\n        };\r\n        const getProgressText = () =&gt; {\r\n\r\n          progressText += '\u30fb';\r\n\r\n          if(progressText.length === 5) {\r\n\r\n            progressText = '\u30fb';\r\n\r\n          }\r\n\r\n          return progressText;\r\n\r\n        };\r\n\r\n      };\r\n\r\n      \/\/ \u8868\u793a\r\n      const showText = (text) =&gt; { \/\/ Obniz \u306e\u30d7\u30c1\u30e2\u30cb\u30bf\u30fc\u306b\u8868\u793a\r\n        \r\n          obniz.display.clear(); \r\n          obniz.display.print(text);\r\n\r\n      };\r\n\r\n      \/\/ \u305d\u306e\u4ed6\r\n      const getRandomNumber = (min, max) =&gt; {\r\n\r\n        return Math.random() * (max - min) + min;\r\n\r\n      }\r\n      \r\n    &lt;\/script&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/strong><\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u3084\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u3089<code>setInterval()<\/code>\u3067\u7e70\u308a\u8fd4\u3057<code>addSecond()<\/code>\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u30b7\u30f3\u30d7\u30eb\u306a\u3082\u306e\u3067\u3059\u304c\u3001\u3072\u3068\u3064\u5de5\u592b\u3092\u3057\u3066\u3044\u308b\u70b9\u3068\u3044\u3048\u3070\u3001<strong>\u5b9f\u884c\u3055\u308c\u308b\u9593\u9694\uff08\u30df\u30ea\u79d2\uff09\u3092\u30e9\u30f3\u30c0\u30e0\u306a\u6570\u5024\u306b\u3057\u3066\u3044\u308b\u90e8\u5206<\/strong>\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u3066\u3082\u4f55\u3082\u52d5\u304d\u304c\u306a\u3044\u3068\u300c<strong>\u3046\u30fc\u3093\u3001\u30db\u30f3\u30c8\u306b\u3061\u3083\u3093\u3068\u52d5\u3044\u3066\u308b\uff1f\uff1f<\/strong>\u300d\u3068\u5fc3\u914d\u306b\u306a\u308b\u3068\u601d\u3046\u306e\u3067\u300c<strong>\u30fb<\/strong>\u300d\u3092\u4e00\u6587\u5b57\u305a\u3064\u5897\u3084\u3057\u3066\u8868\u793a\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u30e9\u30a4\u30d6\u611f\u3092\u51fa\u3057\u305f\u304b\u3063\u305f\u3093\u3067\u3059\u3002<\/p>\n<p>\u3067\u3082\u3001\u3053\u308c\u304c\u3061\u3087\u3046\u3069\uff11\u79d2\u306b\uff11\u56de\u66f4\u65b0\u3055\u308c\u308b\u3068\u3001\u3068\u3069\u306e\u3064\u307e\u308a\u300c<strong>\u30ab\u30f3\u30cb\u30f3\u30b0\u3067\u304d\u3066\u3057\u307e\u3046<\/strong>\u300d\u306e\u3067\u308f\u3056\u3068\u9593\u9694\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u3057\u3066\u308b\u3093\u3067\u3059\u306d\u3002<\/p>\n<p>\uff08\u6b63\u76f4\u3001\u4eca\u56de\u306e\u30b1\u30fc\u30b9\u3060\u3068\u4e0d\u6b63\u306f\u3069\u3046\u3063\u3066\u3053\u3068\u306f\u306a\u3044\u3093\u3067\u3059\u304c\u3001\u3053\u3053\u306f\u958b\u767a\u8005\u306e\u30b5\u30ac\u3067\u3059\u304b\u306d\u2026\ud83d\ude02\uff09<\/p>\n<p>\u307e\u305f\u3001\u30dc\u30bf\u30f3\u306e\u63a5\u7d9a\u306e\u3068\u304d\u306b\u3082\u8a00\u3044\u307e\u3057\u305f\u304c\u3001\u4ee5\u4e0b\u306e\u90e8\u5206\u306e\u300c<strong>signal<\/strong>\u300d\u300c<strong>vcc<\/strong>\u300d\u300c<strong>gnd<\/strong>\u300d\u306e\u756a\u53f7\u304c\u30d4\u30f3\u3092\u6307\u3057\u305f\u5834\u6240\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\uff08\u306a\u306e\u3067\u3001\u4eca\u56de\u306f 0, 1, 2 \u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff09<\/p>\n<pre><strong>const button = obniz.wired('Keyestudio_Button', {signal:0, vcc:1, gnd:2});\r\n<\/strong><\/pre>\n<p>\u3067\u306f\u3001\u30b3\u30fc\u30c9\u3092\u30bb\u30c3\u30c8\u3057\u3066\u4fdd\u5b58\uff08<code>ctrl + s<\/code>\u3067\u3044\u3051\u307e\u3059\uff09\u3057\u305f\u3089\u3001\u4eca\u56de\u306e\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude04\u2728<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u4eca\u56de\u306f\u52d5\u304d\u304c\u5927\u4e8b\u306a\u306e\u3067<code>YouTube<\/code>\u306b\u52d5\u753b\u3092\u30a2\u30c3\u30d7\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u305c\u3072\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\ud83d\udc47\ud83d\udc47\ud83d\udc47<\/p>\n<p><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/E4lwtfSX4O4\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>\u203b \u52d5\u753b\u3092\u898b\u3066\u3044\u305f\u3060\u304f\u3068\u5206\u304b\u308b\u3068\u304a\u308a\u3001\u306a\u3093\u3068\u30d7\u30c1\u30e2\u30cb\u30bf\u30fc\u306b\u306f\u7d75\u6587\u5b57\u307e\u3067\u8868\u793a\u3067\u304d\u307e\u3059\uff01<\/p>\n<p><strong>\u3010\u8ffd\u8a18:2023.06.10\u3011<\/strong><\/p>\n<p><a href=\"https:\/\/twitter.com\/shiro_cake?t=6sQvZbbS1igSui3gyzqhWQ&amp;s=09\">shirocake \u3055\u3093<\/a> \u306b\u3054\u6307\u6458\u3044\u305f\u3060\u3044\u3066\u975e\u516c\u958b\u306b\u306a\u3063\u3066\u3044\u305fYouTube \u52d5\u753b\u3092\u4fee\u6b63\u3057\u307e\u3057\u305f\uff01<\/p>\n<p>\u30db\u30f3\u30c8\u306b\u3044\u3064\u3082\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01\u2728 m(_ _)m \u2728<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2023.6.11\u3011<\/strong><\/p>\n<p>\u305b\u3063\u304b\u304f\u52d5\u753b\u304c\u9593\u9055\u3063\u3066\u3044\u305f\u3053\u3068\u3092\u6559\u3048\u3066\u3082\u3089\u3063\u305f\u306e\u306b\u3001\u4fee\u6b63\u3057\u305f\u52d5\u753b\u304c\u9055\u3046\u3082\u306e\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u3067\u518d\u5ea6\u4fee\u6b63\u3057\u307e\u3057\u305f\u2026\u3082\u3046\u65c5\u884c\u5148\u3067\u3001\u30b9\u30de\u30db\u3067\u4f5c\u696d\u3059\u308b\u306e\u306f\u3084\u3081\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u2026\ud83d\ude2b<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306f\u3068\u3066\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u6a5f\u80fd\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u305d\u306e\u4ed6\u306b\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6a5f\u80fd\u3092\u3064\u304f\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u4eba\u611f\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u3063\u3066\u3054\u8001\u4eba\u306e\u5f98\u5f8a\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b<\/li>\n<li>\u6e29\u5ea6\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u3063\u306630\u5ea6\u3092\u8d85\u3048\u305f\u3089\u3001\u71b1\u4e2d\u75c7\u3092\u6ce8\u610f\u559a\u8d77\u3059\u308b\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b<\/li>\n<li>\u30d6\u30b6\u30fc\u3092\u4f7f\u3063\u3066\uff08\u97f3\u7a0b\u3082\u30bb\u30c3\u30c8\u3067\u304d\u307e\u3059\uff09\u30c1\u30e3\u30a4\u30e0\u306e\u97f3\u697d\u3092\u9cf4\u3089\u3059<\/li>\n<li>\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3092\u3064\u304b\u3063\u3066\u7279\u5b9a\u306e\u4f5c\u696d\u304c\u3069\u3053\u307e\u3067\u5b8c\u4e86\u3057\u305f\u304b\u3092\u76e3\u8996\u3059\u308b<\/li>\n<\/ul>\n<p>\u3082\u3061\u308d\u3093\u30a2\u30a4\u30c7\u30a2\u6b21\u7b2c\u3067\u306f\u305d\u306e\u4ed6\u3044\u308d\u3044\u308d\u306a\u3053\u3068\u304c\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3082\u3057\u3053\u3046\u3044\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u3092\u3054\u5e0c\u671b\u306e\u65b9\u306f\u305c\u3072\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude04\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u3044\u3064\u3082\u3068\u9055\u3063\u3066<code>IoT<\/code>\uff08<strong>Internet of Things<\/strong>\uff09\u306e\u8a18\u4e8b\u3092\u6295\u7a3f\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u304b\u3089\u306f<code>AI<\/code>\u304c\u8d85\u5f37\u529b\u306b\u306a\u3063\u3066\u304f\u308b\u306e\u306f\u307b\u307c\u9593\u9055\u3044\u306a\u3044\u3067\u3057\u3087\u3046\u3057\u3001\u305d\u3046\u306a\u3063\u3066\u304f\u308b\u3068\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u5185\u3067\u5b8c\u7d50\u3059\u308b\u30af\u30ea\u30a8\u30a4\u30c6\u30a3\u30d6\u4f5c\u696d\u306f\u3088\u308a\u4fa1\u5024\u3092\u51fa\u3057\u306b\u304f\u304f\u306a\u3063\u3066\u3044\u304f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u306b\u306f\u3001\u3044\u304b\u306b\u300c<strong>\u30ea\u30a2\u30eb\u3068\u30c7\u30b8\u30bf\u30eb<\/strong>\u300d\u3092\u878d\u5408\u3055\u305b\u305f\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u3066\u3044\u304f\u304b\u304c\u52b4\u50cd\u8005\u306b\u3068\u3063\u3066\u91cd\u8981\u306a\u30d5\u30a1\u30af\u30bf\u30fc\u306b\u306a\u3063\u3066\u3044\u304f\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3068\u306a\u308b\u3068\u3001\u79c1\u306e\u82e6\u624b\u306a\uff08<code>AWS<\/code>\u3068\u304b\u3067\u306f\u306a\u3044\u7269\u8cea\u7684\u306a\uff09\u30a4\u30f3\u30d5\u30e9\u7cfb\u696d\u52d9\u3082\u3061\u3087\u3063\u3068\u305a\u3064\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u3063\u305f\u65b9\u304c\u3044\u3044\u306e\u304b\u306a\u2026\ud83e\udd14 \u306a\u3093\u3066\u8003\u3048\u305f\u308a\u3082\u3057\u307e\u3059\u3002<\/p>\n<p>\u5909\u5316\u306e\u65e9\u3044\u6642\u4ee3\u3067\u3059\u306e\u3067\u3001\u30b9\u30ad\u30eb\u3082\u5fc3\u69cb\u3048\u3082\u6b21\u3005\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3066\u3044\u304b\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u306d\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u3044\u308d\u3044\u308d\u8003\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4445 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300cYouTube \u3092\u500d\u901f\u518d\u751f<br \/>\n\u3057\u3066\u305f\u3089\u82f1\u8a9e\u304c\u805e\u304d\u53d6\u308c\u308b\u3088\u3046\u306b<br \/>\n\u306a\u3063\u3066\u304d\u307e\u3057\u305f\uff08\u4eee\u8aac\u306f\u6b63\u3057\u304b\u3063\u305f\ud83c\udf89\u2728\uff09\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u306e\u9593\u300c\u9769\u65b0\u7684\u306aPython\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff01\u96fb\u5b50\u30da\u30fc\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u5e97\u5185\u3092\u5909\u3048\u308b\u300d\u3068\u3044\u3046\u8a18\u4e8b\u3092\u516c\u958b\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u3068\u304d\u306b\u601d\u3063\u305f\u3053\u3068\u304c\u3072\u3068\u3064\u3042\u308a\u307e\u3057\u305f\u3002 \u305d &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=11700\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Obniz \u3067\u96fb\u5b50\u5de5\u4f5c\uff01\u4f53\u611f60\u79d2\u3067\u30b9\u30c8\u30c3\u30d7\u3059\u308b\u30b2\u30fc\u30e0\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":11712,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[254],"class_list":["post-11700","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-obniz"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/11700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11700"}],"version-history":[{"count":15,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/11700\/revisions"}],"predecessor-version":[{"id":11781,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/11700\/revisions\/11781"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/11712"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}