
{"id":14493,"date":"2022-04-10T17:54:33","date_gmt":"2022-04-10T08:54:33","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=14493"},"modified":"2022-04-18T15:35:42","modified_gmt":"2022-04-18T06:35:42","slug":"hobonicola%e3%82%a2%e3%83%80%e3%83%97%e3%82%bf%e3%83%bc%e3%81%ae%e6%b6%88%e8%b2%bb%e9%9b%bb%e6%b5%81%e3%82%92%e6%b8%9b%e3%82%89%e3%81%97%e3%81%9f%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=14493","title":{"rendered":"hoboNicola\u30a2\u30c0\u30d7\u30bf\u30fc\u306e\u6d88\u8cbb\u96fb\u6d41\u3092\u6e1b\u3089\u3057\u305f\u65b9\u6cd5"},"content":{"rendered":"<h1>hoboNicola\u30a2\u30c0\u30d7\u30bf\u30fc\u306e\u6d88\u8cbb\u96fb\u6d41<\/h1>\n<p><em>\u96fb\u6c17\u3092\u5927\u5207\u306b\u306d<\/em>\uff01 \u3068\u3044\u3046\u3053\u3068\u3067 <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=14381\" target=\"_blank\" rel=\"noopener\">hoboNicola 1.6.1<\/a> \u3067\u5b9a\u5e38\u52d5\u4f5c\u6642\u3084\u30b9\u30ea\u30fc\u30d7\u6642\u306e\u6d88\u8cbb\u96fb\u6d41\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u5de5\u592b\u306e\u8a71\u3002<\/p>\n<figure id=\"attachment_14169\" aria-describedby=\"caption-attachment-14169\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/ae34e8f4f91e052d0b2a92a99942ca67.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-14169\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/ae34e8f4f91e052d0b2a92a99942ca67-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-14169\" class=\"wp-caption-text\">INA226 + WROOM-02 \u96fb\u6d41\u30e2\u30cb\u30bf<\/figcaption><\/figure>\n<h2>\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3054\u3068\u306e\u6d88\u8cbb\u96fb\u6d41<\/h2>\n<p>USB\u7248\u306ehoboNicola\u30a2\u30c0\u30d7\u30bf\u30fc\u306e\u6d88\u8cbb\u96fb\u6d41\u3092\u3001\u5bfe\u5fdc\u3057\u305f\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3054\u3068\u306b\u8a08\u6e2c\u3057\u305f\u3002\u8a08\u6e2c\u306f\u3001\u4ee5\u524d\u306b\u4f5c\u3063\u305f<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=13437\" target=\"_blank\" rel=\"noopener\">WROOM-02\u3068INA226\u3092\u7d44\u5408\u305b\u305fWiFi\u96fb\u6d41\u30e2\u30cb\u30bf <\/a>\u3092\u4f7f\u3063\u3066\u3001\u30bb\u30eb\u30d5\u30d1\u30ef\u30fcHUB\u3068\u30a2\u30c0\u30d7\u30bf\u30fc\u9593\u306eUSB\u30b1\u30fc\u30d6\u30eb\u306b\u6d41\u308c\u308b<strong>VBUS\u96fb\u6d41\u3092\u89b3\u5bdf\u3059\u308b<\/strong>\u3053\u3068\u3067\u884c\u3063\u305f\u3002hoboNicola\u30a2\u30c0\u30d7\u30bf\u30fc\u3084\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u3064\u306a\u3044\u3060\u4f5c\u696d\u7528PC\u81ea\u4f53\u3092\u30b9\u30ea\u30fc\u30d7\u3055\u305b\u3066\u96fb\u6d41\u3092\u30e2\u30cb\u30bf\u3059\u308b\u306e\u3067\u3001WiFi\u3092\u4ecb\u3057\u3066\u30b9\u30de\u30db\u3067\u96fb\u6d41\u304c\u8aad\u3081\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 126px;\">\n<tbody>\n<tr style=\"height: 18px;\">\n<td style=\"width: 16.4556%; height: 18px;\"><strong>\u30b7\u30b9\u30c6\u30e0<\/strong><\/td>\n<td style=\"width: 17.5105%;\"><strong>\u30de\u30a4\u30b3\u30f3<\/strong><\/td>\n<td style=\"width: 13.7132%; height: 18px;\"><strong>\u30a2\u30af\u30c6\u30a3\u30d6\u72b6\u614b<\/strong><\/td>\n<td style=\"width: 14.0295%; height: 18px;\"><strong>\u30b9\u30ea\u30fc\u30d7\u72b6\u614b<\/strong><\/td>\n<td style=\"width: 12.9746%;\"><strong>\u64ec\u4f3c\u30b5\u30b9\u30da\u30f3\u30c9\u6709\u52b9<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 36px;\">\n<td style=\"width: 16.4556%; height: 36px;\"><strong>Pro Micro<\/strong> +<br \/>\nminiUHS +<br \/>\n\u30ad\u30fc\u30dc\u30fc\u30c9<\/td>\n<td style=\"width: 17.5105%;\">ATmega32U4<br \/>\n3.3V\/ 8MHz<\/td>\n<td style=\"width: 13.7132%; height: 36px;\"><strong>75.2mA<\/strong><\/td>\n<td style=\"width: 14.0295%; height: 36px;\">67.9mA<\/td>\n<td style=\"width: 12.9746%;\">3.85mA<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"width: 16.4556%; height: 18px;\">(\u30ad\u30fc\u30dc\u30fc\u30c9\u7121\u3057)<\/td>\n<td style=\"width: 17.5105%;\"><\/td>\n<td style=\"width: 13.7132%; height: 18px;\">18.2mA<\/td>\n<td style=\"width: 14.0295%; height: 18px;\"><\/td>\n<td style=\"width: 12.9746%;\">3.45mA<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"width: 16.4556%; height: 18px;\"><strong>QT Py SAMD21<\/strong> +<br \/>\nminiUHS +<br \/>\n\u30ad\u30fc\u30dc\u30fc\u30c9<\/td>\n<td style=\"width: 17.5105%;\">SAMD21E-18A<br \/>\n48MHz<\/td>\n<td style=\"width: 13.7132%; height: 18px;\"><strong>73.2mA<\/strong><\/td>\n<td style=\"width: 14.0295%; height: 18px;\">66.5mA<\/td>\n<td style=\"width: 12.9746%;\">2.30mA<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.4556%;\">(\u30ad\u30fc\u30dc\u30fc\u30c9\u7121\u3057)<\/td>\n<td style=\"width: 17.5105%;\"><\/td>\n<td style=\"width: 13.7132%;\">16.2mA<\/td>\n<td style=\"width: 14.0295%;\"><\/td>\n<td style=\"width: 12.9746%;\">1.92mA<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.4556%;\"><strong>XIAO-m0<\/strong> +<br \/>\nminiUHS +<br \/>\n\u30ad\u30fc\u30dc\u30fc\u30c9<\/td>\n<td style=\"width: 17.5105%;\">SAMD21G-18A<br \/>\n48MHz<\/td>\n<td style=\"width: 13.7132%;\"><strong>75.3mA<\/strong><\/td>\n<td style=\"width: 14.0295%;\">67.8mA<\/td>\n<td style=\"width: 12.9746%;\">3.65mA<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.4556%;\">(\u30ad\u30fc\u30dc\u30fc\u30c9\u7121\u3057)<\/td>\n<td style=\"width: 17.5105%;\"><\/td>\n<td style=\"width: 13.7132%;\">18.2mA<\/td>\n<td style=\"width: 14.0295%;\"><\/td>\n<td style=\"width: 12.9746%;\">3.30mA<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.4556%;\"><strong>ISP1807MB<\/strong> +<br \/>\nminiUHS +<br \/>\n\u30ad\u30fc\u30dc\u30fc\u30c9<\/td>\n<td style=\"width: 17.5105%;\">ISP1807<br \/>\n(nRF52840)<br \/>\n64MHz<\/td>\n<td style=\"width: 13.7132%;\"><strong>76.3mA<\/strong><\/td>\n<td style=\"width: 14.0295%;\">65.5mA<\/td>\n<td style=\"width: 12.9746%;\">4.1mA<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.4556%;\">(\u30ad\u30fc\u30dc\u30fc\u30c9\u7121\u3057)<\/td>\n<td style=\"width: 17.5105%;\"><\/td>\n<td style=\"width: 13.7132%;\">19.4mA<\/td>\n<td style=\"width: 14.0295%;\"><\/td>\n<td style=\"width: 12.9746%;\">3.75mA<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.4556%;\"><strong>XD87<\/strong><\/td>\n<td style=\"width: 17.5105%;\">ATmega32U4<br \/>\n5V\/ 16MHz<\/td>\n<td style=\"width: 13.7132%;\"><strong>42.8mA<\/strong><\/td>\n<td style=\"width: 14.0295%;\">14.4mA<\/td>\n<td style=\"width: 12.9746%;\">&#8212;<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.4556%;\"><strong>SBK\u30a2\u30c0\u30d7\u30bf\u30fc +<br \/>\n<\/strong>\u30ad\u30fc\u30dc\u30fc\u30c9<\/td>\n<td style=\"width: 17.5105%;\">ATmega32U4<br \/>\n5V\/16MHz + MAX3421E<\/td>\n<td style=\"width: 13.7132%;\"><b>91.5mA<\/b><\/td>\n<td style=\"width: 14.0295%;\">66.5mA<\/td>\n<td style=\"width: 12.9746%;\">3.50mA<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul style=\"list-style-type: circle;\">\n<li><strong>\u30a2\u30af\u30c6\u30a3\u30d6\u72b6\u614b<\/strong>\u3068\u306f\u3001\u30a2\u30c0\u30d7\u30bf\u30fc\u306b\u63a5\u7d9a\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u901a\u5e38\u306b\u6587\u5b57\u3092\u5165\u529b\u3067\u304d\u308b\u72b6\u614b\u3002<\/li>\n<li><strong>\u30b9\u30ea\u30fc\u30d7\u72b6\u614b<\/strong>\u3068\u306f\u3001\u30a2\u30c0\u30d7\u30bf\u30fc\u3092\u30bb\u30eb\u30d5\u30d1\u30ef\u30fc\u306eUSB HUB\u3092\u4ecb\u3057\u3066\u63a5\u7d9a\u3057\u3066\u3044\u308bPC\u3092\u30b9\u30ea\u30fc\u30d7\u3055\u305b\u3066\u3044\u308b\u72b6\u614b\u3002\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u81ea\u4f53\u306e\u30b9\u30ea\u30fc\u30d7\u6642\u96fb\u6d41\uff0bminiUHS\uff0b\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u6d88\u8cbb\u96fb\u6d41\u306b\u76f8\u5f53\u3059\u308b\u3002<\/li>\n<li><strong>\u64ec\u4f3c\u30b5\u30b9\u30da\u30f3\u30c9\u6709\u52b9<\/strong>\u306f\u3001hoboNicola1.6.1\u306e\u8a2d\u5b9a\u306b\u3042\u308b PSEUDO SUSPEND \u3092\u6709\u52b9\u306b\u3057\u3066PC\u3092\u30b9\u30ea\u30fc\u30d7\u3055\u305b\u3066\u3044\u308b\u72b6\u614b\u3002\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306e\u30b9\u30ea\u30fc\u30d7\u6642\u96fb\u6d41\uff0bminiUHS(\u30b5\u30b9\u30da\u30f3\u30c9)\uff0b\u30ad\u30fc\u30dc\u30fc\u30c9(\u30b5\u30b9\u30da\u30f3\u30c9)\u306e\u6d88\u8cbb\u96fb\u6d41\u306b\u76f8\u5f53\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>\u4eca\u56dehoboNicola\u30a2\u30c0\u30d7\u30bf\u30fc\u306b\u63a5\u7d9a\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306f\u3001<a href=\"https:\/\/www.fcl.fujitsu.com\/downloads\/MICRO\/fcl\/keyboards\/fkb-8769.pdf\">\u5bcc\u58eb\u901a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u793e\u306eFKB8769-052<\/a>\u3002\u3059\u3067\u306b\u30c7\u30a3\u30b9\u30b3\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<h4>\u4e0a\u8868\u306b\u3064\u3044\u3066\u306e\u8003\u5bdf\u30fb\u5099\u8003<\/h4>\n<ul>\n<li>\u3044\u305a\u308c\u306e\u30a2\u30c0\u30d7\u30bf\u30fc\u3082\u3001<strong>\u30a2\u30af\u30c6\u30a3\u30d6\u72b6\u614b\u306e\u6d88\u8cbb\u96fb\u6d41\u306b\u306f\u5927\u5dee\u306a\u3044<\/strong>\u3002ATmega32U4(8Mz)\u3068\u3001SAMD21\u3084nRF52840\u3067\u306f\u6027\u80fd\u306b\u76f8\u5f53\u306a\u9055\u3044\u304c\u3042\u308b\u3068\u601d\u3046\u306e\u3060\u304c\u3001\u7701\u96fb\u6d41\u6027\u80fd\u3082\u5411\u4e0a\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308b\u3002<\/li>\n<li><strong>(\u30ad\u30fc\u30dc\u30fc\u30c9\u7121\u3057)<\/strong> \u3068\u3057\u305f\u3068\u304d\u306e\u96fb\u6d41\u306f\u3001\u4e00\u3064\u4e0a\u306e\u884c\u306e\u30a2\u30c0\u30d7\u30bf\u30fc\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u3064\u306a\u3044\u3060\u72b6\u614b\u3067\u96fb\u6d41\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3092\u958b\u59cb\u3057\u3001\u305d\u306e\u307e\u307e\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u629c\u3044\u305f\u3068\u304d\u306e\u5024\u3092\u8a18\u9332\u3057\u305f\u3002\u3064\u307e\u308a\u3001\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\uff0bminiUHS\u306e\u6d88\u8cbb\u96fb\u6d41\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u3002<\/li>\n<li>\u30ad\u30fc\u30dc\u30fc\u30c9\u6709\u7121\u306e\u96fb\u6d41\u5dee\u304b\u3089 FKB8769-052\u306e<strong>\u5b9a\u5e38\u6642\u306e\u6d88\u8cbb\u96fb\u6d41\u306f\u7d0457mA<\/strong>\u3001\u3053\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u3092<strong>\u30b9\u30ea\u30fc\u30d7\u3055\u305b\u305f\u3068\u304d\u306e\u6d88\u8cbb\u96fb\u6d41\u306f0.35\uff5e0.4mA\u307b\u3069<\/strong>\u3060\u308d\u3046\u3068\u3044\u3046\u3053\u3068\u304c\u5206\u304b\u308b\u3002\u305f\u3060\u3001\u8ca0\u8377\u304c\u5909\u308f\u308b\u3053\u3068\u3067USB\u30cf\u30d6\u304b\u3089\u306eVBUS\u96fb\u5727\u3082\u5909\u5316\u3059\u308b\u306e\u3067\u5358\u7d14\u306b\u306f\u8a55\u4fa1\u3067\u304d\u306a\u3044\u304c\u3002<\/li>\n<li>Pro Micro\u3001XIAO-m0 \u3067\u306f\u30aa\u30f3\u30dc\u30fc\u30c9\u306ePON(PowerOn) LED\u304c\u70b9\u706f\u3057\u3066\u3044\u308b\u3002\u305d\u308c\u306b\u5bfe\u3057\u3066\u3001QT Py-m0\u3068ISP1807MB\u306b\u306fPON LED\u304c\u306a\u3044(ISP1807MB\u306ePON-LED\u306f\u5916\u3057\u3066\u3057\u307e\u3063\u305f)\u3002+3.3V\u52d5\u4f5c\u306e\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3067\u306f\u3001PON LED\u306e\u6709\u7121\u3067\u7d041\uff5e1.5mA\u307b\u3069\u6d88\u8cbb\u96fb\u6d41\u304c\u5909\u308f\u308b\u3053\u3068\u304c\u591a\u3044 (LED\u306eV<sub>F<\/sub>\u3068\u76f4\u5217\u62b5\u6297\u306e\u5024\u306b\u3088\u308b) \u3002<\/li>\n<\/ul>\n<h4>xd87\u306b\u3064\u3044\u3066<\/h4>\n<p>xd87 PCB\u306b\u306f\u300114\u500b\u306eRGB LED (\u304a\u305d\u3089\u304f\u3001WS2812B)\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<figure id=\"attachment_11021\" aria-describedby=\"caption-attachment-11021\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/02\/4d2b203949174e40650ea1e9c51e8584.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-11021\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2020\/02\/4d2b203949174e40650ea1e9c51e8584-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-11021\" class=\"wp-caption-text\">xd87 rgbled<\/figcaption><\/figure>\n<p>RGB LED\u306f\u4e00\u3064\u4e00\u3064\u306bCPU\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u6d88\u706f(RGB\u5024\u3092\u3059\u3079\u30660\u306b) \u3057\u3066\u3082\u305d\u308c\u306a\u308a\u306b\u96fb\u6d41\u304c\u6d41\u308c\u3066\u3057\u307e\u3046\u3002\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u3092\u898b\u3066\u3082\u3001\u6d88\u706f\u6642\u306e\u6d88\u8cbb\u96fb\u6d41\u306b\u306f\u3063\u304d\u308a\u3068\u306f\u8a00\u53ca\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u691c\u7d22\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u9ad8\u6027\u80fdArduino\u30dc\u30fc\u30c9\u306eteensy\u30b7\u30ea\u30fc\u30ba\u3067\u6709\u540d\u306a<strong>pjrc.com<\/strong>\u306b\u00a0<span style=\"font-size: 14pt;\"> <a href=\"https:\/\/www.pjrc.com\/how-much-current-do-ws2812-neopixel-leds-really-use\/\" target=\"_blank\" rel=\"noopener\">How Much Current Do WS2812 \/ NeoPixel LEDs Really Use?<\/a>\u00a0<\/span> \u3068\u3044\u3046\u30da\u30fc\u30b8\u304c\u3042\u3063\u305f\u3002\u3053\u3053\u306e\u5b9f\u6e2c\u5024\u3068\u3057\u3066\u6d88\u706f\u6642\u306e\u6d88\u8cbb\u96fb\u6d41\u306f1\u500b\u306b\u3064\u304d\u7d041mA\u7a0b\u5ea6\u3068\u306e\u3053\u3068\u3002<\/p>\n<p>\u3057\u305f\u304c\u3063\u3066\u3001xd87 PCB \u3067\u306f\u4f55\u3082\u3057\u3066\u3044\u306a\u304f\u3066\u308214mA\u7a0b\u5ea6\u304c\u6d88\u8cbb\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u306b\u306a\u308b\u3002<strong>\u3042\u307e\u308a\u9811\u5f35\u3063\u3066\u3082\u3057\u3087\u3046\u304c\u306a\u3044<\/strong>\u304b\u3082\u3057\u308c\u306a\u3044\u3057\u300114mA\u306e\u305f\u3081\u306bRGBLED\u306b\u30cf\u30f3\u30c0\u3054\u3066\u3092\u3042\u3066\u3066\u5265\u304c\u3059\u306e\u3082\u6c17\u304c\u5f15\u3051\u308b\u3002<\/p>\n<h2>\u7701\u96fb\u6d41\u306e\u305f\u3081\u306e\u5b9f\u88c5<\/h2>\n<p>\u30c7\u30d0\u30a4\u30b9\u3054\u3068\u306e\u521d\u671f\u8a2d\u5b9a\u306f\u30b9\u30b1\u30c3\u30c1(ino\u30d5\u30a1\u30a4\u30eb)\u3068\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u306b\u304a\u3044\u305f <strong>device_setup.h<\/strong> \u306b\u3001\u305d\u306e\u5f8c\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u72b6\u614b\u3001\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u3067\u306e\u5b9f\u88c5\u306f hoboNicola\u30e9\u30a4\u30d6\u30e9\u30ea\u306e <strong>hobo_sleep.cpp<\/strong> \u306b\u5165\u308c\u305f\u3002<\/p>\n<p>Adafruit QT Py SAMD21 \u7528\u3092\u4f7f\u3063\u305f\u4ee5\u4e0b\u306e\u30c6\u30b9\u30c8\u7528\u30b9\u30b1\u30c3\u30c1\u3092\u4f8b\u306b\u8aac\u660e\u3057\u3066\u307f\u308b\u3002\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u306f\u3001usb_hobo_nicola.ino\u3092\u5358\u7d14\u5316\u3057miniUHS\u3068\u306e\u63a5\u7d9a\u3084HID\u30ad\u30fc\u30dc\u30fc\u30c9\u3068\u3057\u3066\u306e\u6a5f\u80fd\u3092\u9664\u3044\u305f\u3082\u306e\u306b\u306a\u308b\u3002\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u306f\u3001hoboNicola\u30e9\u30a4\u30d6\u30e9\u30ea1.6.1\u304cArduino IDE\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308c\u3070\u30d3\u30eb\u30c9\u3067\u304d\u308b(\u306f\u305a)\u3002<\/p>\n<pre class=\"nums:true lang:default decode:true\">#include \"Adafruit_TinyUSB.h\"\r\n#include \"device_setup.h\"\r\n#include \"hobo_sleep.h\"\r\nvoid setup() {\r\n  hobo_device_setup();\r\n}\r\nvoid loop() {\r\n#if 1\r\n  if (USBDevice.suspended())\r\n    enter_sleep(500);\r\n  else\r\n    enter_sleep();\r\n#else\r\n    enter_sleep();\r\n#endif\r\n}<\/pre>\n<p>\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u306e\u3001\u5404\u90e8\u5206\u3092\u30b3\u30e1\u30f3\u30c8\u306b\u3057\u305f\u308a\u3001#if 1 \u3092 #if 0\u306b\u66f8\u304d\u63db\u3048\u305f\u308a\u3059\u308b\u3053\u3068\u3067\u3001\u6d88\u8cbb\u96fb\u6d41\u3092\u524a\u6e1b\u3059\u308b\u52b9\u679c\u3092\u78ba\u8a8d\u3057\u305f\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 36.7088%;\">\u30b9\u30b1\u30c3\u30c1\u306e\u5185\u5bb9<\/td>\n<td style=\"width: 31.6456%;\">\u6d88\u8cbb\u96fb\u6d41<br \/>\n(VBUS\u96fb\u6d41)<\/td>\n<td style=\"width: 31.6456%;\">\u5099\u8003<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 36.7088%;\">hobo_device_setup() \u7121\u3057<br \/>\nenter_sleep() \u7121\u3057<\/td>\n<td style=\"width: 31.6456%;\"><strong><span style=\"font-size: 14pt;\">13.9mA<\/span><\/strong><\/td>\n<td style=\"width: 31.6456%;\">\u7a7a\u306e\u30b9\u30b1\u30c3\u30c1\u306b\u76f8\u5f53<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 36.7088%;\">hobo_device_setup() \u6709\u308a<br \/>\nenter_sleep() \u7121\u3057<\/td>\n<td style=\"width: 31.6456%;\"><span style=\"font-size: 14pt;\"><strong>12.5mA<\/strong><\/span><\/td>\n<td style=\"width: 31.6456%;\">1.4mA\u306e\u524a\u6e1b<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 36.7088%;\">hobo_device_setup() \u6709\u308a<br \/>\nenter_sleep() \u6709\u308a<\/td>\n<td style=\"width: 31.6456%;\"><span style=\"font-size: 14pt;\"><strong>6.93mA<\/strong><\/span><\/td>\n<td style=\"width: 31.6456%;\">5.6mA\u306e\u524a\u6e1b<br \/>\n8\u884c\u76ee\u3092 #if 0\u00a0 \u306b<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 36.7088%;\">hobo_device_setup() \u6709\u308a<br \/>\nenter_sleep(500)\u00a0 \u6709\u308a<\/td>\n<td style=\"width: 31.6456%;\"><span style=\"font-size: 14pt;\"><strong>0.35mA<\/strong><\/span><\/td>\n<td style=\"width: 31.6456%;\">\u3055\u3089\u306b -6.55mA\u3002<br \/>\n\u4e0a\u8a18\u30b9\u30b1\u30c3\u30c1\u306e\u72b6\u6cc1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><em>USBDevice.suspended();<\/em> \u306f\u3001\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306eUSB\u304c\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306e\u3068\u304d true \u3092\u8fd4\u3059\u3002<\/li>\n<li><em>enter_sleep(500);<\/em> \u3068\u3059\u308b\u3053\u3068\u3067\u3001SAMD21\u306f<strong>\u30b9\u30bf\u30f3\u30d0\u30a4\u30b9\u30ea\u30fc\u30d7\u72b6\u614b<\/strong> \u306b\u5165\u308a\u3001500msec\u306b\u4e00\u5ea6\u3060\u3051\u30e1\u30a4\u30f3\u30eb\u30fc\u30d7\u304c\u56de\u308b\u3053\u3068\u306b\u306a\u308b\u3002<\/li>\n<li>\u5b9f\u969b\u306e<strong>usb_hobo_nicola.ino<\/strong>\u3067\u306f\u3001500msec\u3054\u3068\u306bMAX3421E\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u4f55\u304b\u5165\u529b\u304c\u3042\u3063\u305f\u304b\u3069\u3046\u304b\u3092\u8abf\u3079\u3001\u5165\u529b\u304c\u3042\u3063\u305f\u306a\u3089\u3070 <em>\u00a0USBDevice.remoteWakeup();<\/em> \u3092\u547c\u3093\u3067\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u304b\u3089\u306e\u5fa9\u5e30(\u30ea\u30b8\u30e5\u30fc\u30e0)\u3092\u8981\u6c42\u3059\u308b\u3002<\/li>\n<\/ul>\n<h4>hobo_device_setup()<\/h4>\n<p>usb_hobo_nicola.ino\u306e <em>setup()<\/em>\u3067\u306f\u3001ino\u3068\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u306b\u3042\u308b <strong>device_setup.h<\/strong> \u5185\u306e <em>hobo_device_setup();<\/em> \u3092\u547c\u3073\u51fa\u3057\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u4f9d\u5b58\u306e\u521d\u671f\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u304a\u308a\u3001\u30de\u30a4\u30b3\u30f3\u5185\u8535\u5468\u8fba\u30c7\u30d0\u30a4\u30b9\u306e\u3046\u3061\u4f7f\u308f\u306a\u3044\u3082\u306e\u3092\u505c\u6b62\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>SAMD21\u3067\u306f\u3001<strong>PM (Power Manager)\u306eAPBCMASK \u30ec\u30b8\u30b9\u30bf<\/strong>\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u3067\u3001APBC (Advanced Peripheral Bus C)\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u5468\u8fba\u30c7\u30d0\u30a4\u30b9\u306e\u30af\u30ed\u30c3\u30af\u3092\u505c\u6b62\u3057\u3066\u3044\u308b\u3002hoboNicola\u3067\u306f\u3001SPI\u4ee5\u5916\u306eSERCOM (SERial COMmunication Interface) \u306f\u4f7f\u308f\u306a\u3044\u306e\u30676\u3064\u306eSERCOM\u306e\u3046\u3061\u306e5\u3064\u3092\u505c\u6b62\u3057\u3066\u3044\u308b\u3002QT Py SAMD21\u7528\u306e\u30b3\u30fc\u30c9\u3092\u5207\u308a\u51fa\u3059\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">uint32_t pm = PM_APBCMASK_ADC | PM_APBCMASK_AC | PM_APBCMASK_DAC | PM_APBCMASK_I2S | PM_APBCMASK_PTC |\r\n\tPM_APBCMASK_TCC0 | PM_APBCMASK_TCC1 | PM_APBCMASK_TCC2 | \r\n\tPM_APBCMASK_TC3 | PM_APBCMASK_TC4 | PM_APBCMASK_TC5 | PM_APBCMASK_TC6 | PM_APBCMASK_TC7;\r\npm |= PM_APBCMASK_SERCOM0 | PM_APBCMASK_SERCOM1 | PM_APBCMASK_SERCOM3 | PM_APBCMASK_SERCOM4  | PM_APBCMASK_SERCOM5;\r\nPM-&gt;APBCMASK.reg &amp;= ~pm;\r\n<\/pre>\n<p>SPI\u7528\u306eSERCOM\u306fXIAO\u3068QT Py\u3068\u3067\u7570\u306a\u3063\u3066\u3044\u308b\u3002<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=14346\" target=\"_blank\" rel=\"noopener\">\u76f8\u9055\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089\u306e\u6295\u7a3f\u3092\u53c2\u7167<\/a>\u306e\u3053\u3068\u3002<\/p>\n<p>\u307e\u305fQT Py SAMD21\u306e\u30aa\u30f3\u30dc\u30fc\u30c9LED\u3068\u3057\u3066 NeoPixel (WS2812) \u304c1\u3064\u3060\u3051\u8f09\u3063\u3066\u304a\u308a\u3001\u3053\u306eLED\u306eVDD\u3082GPIO\u30dd\u30fc\u30c8(PA18, D12)\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u3002XD87\u306e\u8a71\u3067\u3082\u66f8\u3044\u305f\u3088\u3046\u306b\u3001NeoPixel\u30e2\u30ce\u306f\u70b9\u706f\u3057\u306a\u304f\u3066\u3082\u96fb\u6d41\u98df\u3046\u306e\u3067\u3053\u3046\u3044\u3046\u69cb\u6210\u306f\u52a9\u304b\u308b\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u30010.3mA\u307b\u3069\u6d88\u8cbb\u96fb\u6d41\u304c\u6e1b\u3063\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">#if defined(ADAFRUIT_QTPY_M0)\t\r\n  digitalWrite(PIN_NEOPIXEL_VCC, 0);\r\n#endif\r\n<\/pre>\n<p>hobo_device_setup() \u306e\u547c\u3073\u51fa\u3057\u306b\u3088\u308a\u3001\u6d88\u8cbb\u96fb\u6d41\u3092 1.4mA \u524a\u6e1b\u3067\u304d\u305f\u3002<\/p>\n<p>(NexoPixel LED\u306e\u6d88\u8cbb\u96fb\u6d41\u306b\u3064\u3044\u3066\u3001XD87\u306f+5V\u96fb\u6e90\u3001QT Py\u306f+3.3V\u96fb\u6e90\u306e\u76f8\u9055\u304c\u3042\u308b\u3002\u4eca\u6c17\u304c\u3064\u3044\u305f\u304c\u3001+3.3V\u96fb\u6e90\u306eWS2812B \u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u304c\u8f09\u3063\u3066\u3044\u308b\u3093\u3060\u308d\u3046\u304b)\u3002<\/p>\n<h3>\u30a2\u30af\u30c6\u30a3\u30d6\u72b6\u614b<\/h3>\n<p>\u30a2\u30af\u30c6\u30a3\u30d6\u72b6\u614b\u3068\u306f\u3001\u30b9\u30b1\u30c3\u30c1\u306e loop() \u304c\u56de\u3063\u3066\u3044\u308b\u72b6\u614b\u306e\u3053\u3068\u3067\u3001USB\u7248\u306ehoboNicola\u3067\u306f MAX3421E\u306b\u5bfe\u3059\u308bSPI\u901a\u4fe1\u304c\u7d76\u3048\u9593\u306a\u304f\u884c\u308f\u308c\u3066\u3044\u308b\u3002hoboNicola1.6.1\u3067\u306f<strong>\u77ed\u671f\u9593\u306e\u30a2\u30a4\u30c9\u30eb\u30b9\u30ea\u30fc\u30d7<\/strong>\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u6d88\u8cbb\u96fb\u6d41\u3092\u6291\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>samd21\u3067\u306f\u3001<strong>WFI (Wait For Interrupt) \u547d\u4ee4<\/strong>\u306e\u5b9f\u884c\u306b\u3088\u3063\u3066\u30de\u30a4\u30b3\u30f3\u306e\u30b9\u30ea\u30fc\u30d7\u30e2\u30fc\u30c9\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u306a\u308b\u3002\u3053\u306e\u547d\u4ee4\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30de\u30b9\u30af\u3055\u308c\u3066\u3044\u306a\u3044\u5272\u8fbc\u307f\u304c\u8d77\u304d\u308b\u307e\u3067\u30de\u30a4\u30b3\u30f3\u306f<strong>\u30a2\u30a4\u30c9\u30eb\u30b9\u30ea\u30fc\u30d7\u307e\u305f\u306f\u30b9\u30bf\u30f3\u30d0\u30a4\u30b9\u30ea\u30fc\u30d7(\u30c7\u30a3\u30fc\u30d7\u30b9\u30ea\u30fc\u30d7)\u72b6\u614b<\/strong>\u306b\u5165\u308b\u3002<\/p>\n<p>\u30b9\u30ea\u30fc\u30d7\u7528\u306b\u7528\u610f\u3057\u305f\u95a2\u6570 <em>enter_sleep();\u00a0<\/em> \u306e\u5185\u90e8\u3067\u306f\u3001\u5f15\u6570\u306e\u5024\u306b\u5fdc\u3058\u3066\u30a2\u30a4\u30c9\u30eb\u30b9\u30ea\u30fc\u30d7\u307e\u305f\u306f\u6307\u5b9a\u671f\u9593\u306e\u30b9\u30bf\u30f3\u30d0\u30a4\u30b9\u30ea\u30fc\u30d7\u306b\u5165\u308b\u3088\u3046\u306b\u3057\u305f\u3002\u30a2\u30a4\u30c9\u30eb\u30b9\u30ea\u30fc\u30d7\u304b\u3089\u306e\u5fa9\u5e30\u306f\u3001SAMD21\u7528Arduino\u30b3\u30a2\u304c\u7528\u610f\u3057\u3066\u3044\u308b1msec\u5468\u671f\u306e<strong>SysTick\u5272\u8fbc\u307f<\/strong>\u306b\u3088\u308b\u306e\u3067\u3001\u7279\u306b\u4f55\u3082\u3057\u306a\u304f\u3066\u3082\u3059\u3050\u306b\u30a2\u30af\u30c6\u30a3\u30d6\u72b6\u614b\u306b\u623b\u308b\u3002\u30c6\u30b9\u30c8\u7528\u30b9\u30b1\u30c3\u30c1\u3067\u306f\u3001\u7d041msec\u9593\u306e\u30a2\u30a4\u30c9\u30eb\u30b9\u30ea\u30fc\u30d7\u306b\u3088\u308a\u3001<strong>\u6d88\u8cbb\u96fb\u6d41\u306f 5.6mA\u524a\u6e1b<\/strong>\u3055\u308c\u305f\u3002<\/p>\n<p>AVR\u3067\u306e <em>set_sleep_mode(SLEEP_MODE_IDLE)<\/em> \u306e\u5b9f\u884c\u3068\u3001Timer\/Counter0 \u30e6\u30cb\u30c3\u30c8\u306e\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u5272\u8fbc\u307f (16MHz\u7248\u306f1msec\u5468\u671f\u30018MHz\u7248\u306f2msec\u5468\u671f) \u306b\u3088\u308b\u5fa9\u5e30\u3068\u4f3c\u3066\u3044\u308b\u304c\u3001SAMD21\u306e\u65b9\u304c\u7701\u96fb\u6d41\u52b9\u679c\u306f\u9ad8\u304b\u3063\u305f\u3002<\/p>\n<h3>\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b<\/h3>\n<p>\u30a2\u30c0\u30d7\u30bf\u30fc\u3092\u63a5\u7d9a\u3057\u3066\u3044\u308bPC\u3084\u30cf\u30d6\u306eUSB\u304c\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306b\u5165\u3063\u305f\u3053\u3068\u3092\u691c\u51fa\u3059\u308b\u3068\u3001hoboNicola\u306f\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306b\u5165\u308b\u3002MAX3421E\u3068\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u64ec\u4f3c\u30b9\u30ea\u30fc\u30d7\u306b\u3064\u3044\u3066\u306f\u5f8c\u8ff0\u3059\u308b\u3002<\/p>\n<p>USB\u304c\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u304b\u3069\u3046\u304b\u306f\u3001TinyUSB\u30e9\u30a4\u30d6\u30e9\u30ea\u306e <em>USBDevice.suspended()<\/em>\u00a0 \u307e\u305f\u306f Arduino\u30e9\u30a4\u30d6\u30e9\u30ea\u306e <em>USBDevice.isSuspended()<\/em> \u3067\u691c\u51fa\u3067\u304d\u308b\u3002\u4e0a\u8a18\u306e\u30c6\u30b9\u30c8\u7528\u30b9\u30b1\u30c3\u30c1\u3067\u306f\u3001\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306a\u3089\u3070 <em>enter_sleep(500);<\/em> \u3068\u3057\u3066500msec\u9593\u306e\u30b9\u30bf\u30f3\u30d0\u30a4\u30b9\u30ea\u30fc\u30d7\u3092\u7e70\u308a\u8fd4\u3059\u3002<\/p>\n<p>\u30b9\u30bf\u30f3\u30d0\u30a4\u30b9\u30ea\u30fc\u30d7\u306b\u5165\u308b\u3068\u304d\u306f\u3001\u5fa9\u5e30\u8981\u56e0\u3068\u3059\u308b\u305f\u3081\u306bSAMD21\u304c\u3082\u3064RTC\u3092\u4f7f\u3063\u3066\u304a\u308a <em>enter_sleep()<\/em> \u306e\u5f15\u6570\u306e\u671f\u9593\u7d4c\u904e\u3057\u305f\u3089\u5272\u8fbc\u307f\u3092\u8d77\u3053\u3059\u3088\u3046\u306b\u3057\u305f\u3002\u305d\u306e\u76f4\u524d\u306b SysTick\u5272\u8fbc\u307f\u3092\u30de\u30b9\u30af\u3057\u3001 <span class=\"lang:default highlight:0 decode:true crayon-inline\">SCB-&gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;<\/span> \u3068\u3057\u3066\u30de\u30a4\u30b3\u30f3\u81ea\u4f53\u3092\u4f4e\u6d88\u8cbb\u96fb\u529b\u30e2\u30fc\u30c9\u3068\u3057\u3066\u3044\u308b (\u5b9f\u88c5\u306f\u3001<strong>hobo_sleep.cpp<\/strong>) \u3002<\/p>\n<p>SAMD21\u306eRTC\u306e\u521d\u671f\u5316\u65b9\u6cd5\u306f\u3001QT Py\u3068XIAO-m0\u3067\u307b\u307c\u5171\u901a\u3060\u304c\u3001XIAO-m0\u306f32.768kHz\u306e\u5916\u90e8\u30aa\u30b7\u30ec\u30fc\u30bf\u3092\u5099\u3048\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u3042\u305f\u308a\u306e\u5207\u308a\u5206\u3051 (<em>#ifdef CRYSTALLESS<\/em>) \u304c\u5165\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>\u30a2\u30a4\u30c9\u30eb\u30b9\u30ea\u30fc\u30d7\u6642\u304c6.90mA\u3060\u3063\u305f\u306e\u306b\u5bfe\u3057\u3001<strong>\u30b9\u30bf\u30f3\u30d0\u30a4\u30b9\u30ea\u30fc\u30d7\u671f\u9593\u4e2d\u306e\u6d88\u8cbb\u96fb\u6d41\u306f0.35mA\u307e\u3067\u5c11\u306a\u304f<\/strong>\u3067\u304d\u305f\u3002\u3055\u3089\u306b\u3001USB\u306e\u30af\u30ed\u30c3\u30af\u3092\u6b62\u3081\u308b\u3068\u304bD+\u306e\u30d7\u30eb\u30a2\u30c3\u30d7\u3092\u3084\u3081\u308b\u3068\u304b\u3059\u308b\u3068\u6d88\u8cbb\u96fb\u6d41\u306f\u3082\u3063\u3068\u6e1b\u308b\u304c\u3001\u305d\u306e\u77ac\u9593PC\u304b\u3089USB\u30c7\u30d0\u30a4\u30b9\u306e\u8a8d\u8b58\u304c\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u63a1\u7528\u3057\u306a\u304b\u3063\u305f\u3002USB\u3092\u6b62\u3081\u3066\u3057\u307e\u3046\u3068\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u304c\u7d42\u4e86\u3057\u305f\u3053\u3068\u3082\u691c\u51fa\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>AVR\u3067\u306f\u3001<em>set_sleep_mode(SLEEP_MODE_PWR_DOWN);\u00a0<\/em> \u306b\u3088\u3063\u3066\u30d1\u30ef\u30fc\u30c0\u30a6\u30f3\u30b9\u30ea\u30fc\u30d7\u306b\u5165\u308a\u3001\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30bf\u30a4\u30de\u30fc\u5272\u8fbc\u307f\u3067\u5fa9\u5e30\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002\u6700\u521d\u306b\u8f09\u305b\u305f\u8868\u304b\u3089\u3059\u308b\u3068\u3001\u30d1\u30ef\u30fc\u30c0\u30a6\u30f3\u30b9\u30ea\u30fc\u30d7\u4e2d\u306ePro Micro (3.3V\/8MHz)\u306e\u6d88\u8cbb\u96fb\u6d41\u306f1.4mA\u7a0b\u5ea6\u3068\u63a8\u6e2c\u3055\u308c\u308b\u304c\u3001PON LED\u304c\u70b9\u706f\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u8003\u3048\u308c\u3070\u3001\u307e\u305a\u307e\u305a\u3068\u3044\u3063\u305f\u3068\u3053\u308d\u3060\u308d\u3046\u3002<\/p>\n<h3>nRF52\u3067\u306e\u7701\u96fb\u6d41\u5316\u306b\u3064\u3044\u3066<\/h3>\n<p>\u4eca\u56de\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001nRF52\u306e\u6d88\u8cbb\u96fb\u6d41\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u30b3\u30fc\u30c9\u306f\u7279\u306b\u66f8\u3044\u3066\u304a\u3089\u305a\u3001<em>enter_sleep(interval)<\/em> \u306e\u4e2d\u8eab\u306f\u540c\u671f\u9593\u306e <em>delay(interval)<\/em> \u3092\u547c\u3073\u51fa\u3059\u3060\u3051\u306b\u3057\u305f\u3002\u3064\u307e\u308a\u3001\u30a2\u30af\u30c6\u30a3\u30d6\u6642\u306e\u6d88\u8cbb\u96fb\u6d41\u306e\u524a\u6e1b\u306f\u3001Adafruit nRF52 Arduino\u306eFreeRTOS \u306e\u5b9f\u88c5\u4efb\u305b\u3068\u3057\u305f\u3002\u8a73\u3057\u304f\u306f\u3001<a href=\"https:\/\/www.freertos.org\/low-power-tickless-rtos.html\" target=\"_blank\" rel=\"noopener\">https:\/\/www.freertos.org\/low-power-tickless-rtos.html<\/a> \u3092\u53c2\u7167\u306e\u3053\u3068\u3002\u5185\u8535\u5468\u8fba\u30c7\u30d0\u30a4\u30b9\u3092\u6b62\u3081\u308b\u306a\u3069\u306e\u5de5\u592b\u306b\u3088\u308a\u3001\u3082\u3046\u3061\u3087\u3063\u3068\u6d88\u8cbb\u96fb\u6d41\u3092\u6e1b\u3089\u305b\u308b\u3088\u3046\u306a\u6c17\u3082\u3057\u3066\u3044\u308b\u304c\u3001\u307e\u3042\u3001\u3053\u308c\u304b\u3089\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u64ec\u4f3c\u30b5\u30b9\u30da\u30f3\u30c9\u6a5f\u80fd<\/h2>\n<p>\u4eca\u56de\u4f7f\u3063\u305f\u5bcc\u58eb\u901a\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u6642\u306e\u6d88\u8cbb\u96fb\u6d41\u306f57mA\u7a0b\u5ea6\u306a\u306e\u3060\u304c\u3001\u5f93\u6765(1.5\u7248\u307e\u3067)\u306ehoboNicola\u30a2\u30c0\u30d7\u30bf\u30fc\u3067\u306f\u3001PC\u3092\u30b9\u30ea\u30fc\u30d7\u3057\u3066\u3082\u5e38\u306b57mA (+\u30a2\u30c0\u30d7\u30bf\u30fc\u306e\u6d88\u8cbb\u96fb\u6d41)\u304c\u6d41\u308c\u3066\u3044\u305f\u3002\u3064\u307e\u308a\u3001\u9811\u5f35\u3063\u3066\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306e\u96fb\u6d41\u309210mA\u6e1b\u3089\u3059\u3088\u308a\u3082 miniUHS\u3084\u30ad\u30fc\u30dc\u30fc\u30c9\u81ea\u4f53\u306e\u6d88\u8cbb\u96fb\u6d41\u3092\u6291\u3048\u306a\u3051\u308c\u3070\u3042\u307e\u308a\u610f\u5473\u304c\u306a\u3044\u3002<\/p>\n<p>miniUHS(\u304a\u3088\u3073\u30ad\u30fc\u30dc\u30fc\u30c9)\u306e\u5236\u5fa1\u3092\u884c\u3046<a href=\"https:\/\/github.com\/felis\/USB_Host_Shield_2.0\" target=\"_blank\" rel=\"noopener\"><strong> USB Host Library 2.0<\/strong><\/a> (<strong>UHS\u30e9\u30a4\u30d6\u30e9\u30ea<\/strong>)\u306b\u306f\u3001\u3056\u3063\u3068\u898b\u305f\u3068\u3053\u308d\u305d\u3046\u3044\u3063\u305f\u30b3\u30fc\u30c9\u306f\u5165\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306bAPI\u3092\u8ffd\u52a0\u3057\u3001MAX3421E\u304a\u3088\u3073\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u3055\u305b\u305f\u308a\u30ea\u30b8\u30e5\u30fc\u30e0\u3055\u305b\u305f\u308a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<h4 id=\"hobonicola_include_uhslib\">UHS\u30e9\u30a4\u30d6\u30e9\u30ea\u306ehoboNicola\u3078\u306e\u5305\u542b\u306b\u3064\u3044\u3066<\/h4>\n<p>\u307e\u305a\u3001\u4eca\u56de\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304b\u3089UHS\u30e9\u30a4\u30d6\u30e9\u30ea\u306fArduino IDE\u306b\u8ffd\u52a0\u3057\u305f\u3082\u306e\u3067\u306f\u306a\u304f\u3001<strong>hoboNicola\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30bd\u30fc\u30b9\u30c4\u30ea\u30fc\u306b\u5305\u542b<\/strong>\u3059\u308b\u3088\u3046\u306b\u3057\u305f (<strong>src\/UHSLib2.0<\/strong>) \u3002\u3053\u308c\u306f\u3001ATSAMD\u7528\u30c4\u30fc\u30eb\u30c1\u30a7\u30fc\u30f3\u306b\u542b\u307e\u308c\u3066\u3044\u308b <strong>CMSIS-Atmel<\/strong> \u5185\u306e\u3044\u304f\u3064\u304b\u306e\u578b\u5b9a\u7fa9\u540d\u304c\u30aa\u30ea\u30b8\u30ca\u30eb\u306eUHS\u30e9\u30a4\u30d6\u30e9\u30ea\u5185\u306e\u5b9a\u7fa9\u3068\u91cd\u8907\u3057\u3066\u304a\u308a\u3001 UHS\u30e9\u30a4\u30d6\u30e9\u30ea\u5185\u3067\u5e83\u304f\u4f7f\u308f\u308c\u3066\u3044\u308b\u69cb\u9020\u4f53\u3084\u30af\u30e9\u30b9\u540d\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u3053\u3068\u306b\u3088\u308b\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u30aa\u30ea\u30b8\u30ca\u30eb\u306e <em><strong>struct UsbDevice<\/strong><\/em> \u306f <em><strong>struct UsbDeviceDefinition<\/strong> <\/em>\u3068\u3057\u3001<em><strong>class USB<\/strong><\/em> \u306f <em><strong>class USBHost<\/strong><\/em> \u306b\u3057\u305f\u3002\u3055\u3089\u306b\u306f\u3001ino\u30d5\u30a1\u30a4\u30eb\u5185\u3067\u5f93\u6765 <em><strong>USB Usb<\/strong><\/em>\u3068\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u306f\u3001<em><strong>USBHost Usbhost<\/strong><\/em> \u306b\u5909\u66f4\u3057\u305f (Usb\u3068\u3044\u3046\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540d\u3082CMSIS\u3068\u7af6\u5408\u3059\u308b)\u3002<\/p>\n<p>\u4eca\u56de\u306eUHS\u30e9\u30a4\u30d6\u30e9\u30ea\u5185\u90e8\u306e\u5909\u66f4\u306b\u3042\u305f\u3063\u3066\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u5909\u66f4\u3057\u306a\u304b\u3063\u305f\u304c\u3001<em>class USBHost<\/em>\u306e\u5b9a\u7fa9\u304c<strong>UsbCore.h<\/strong>\u306b\u3042\u3063\u3066\u5b9f\u88c5\u306f <strong>Usb.cpp<\/strong> \u306b\u3042\u308b\u306a\u3069\u3001\u30aa\u30ea\u30b8\u30ca\u30eb\u3088\u308a\u66f4\u306b\u5206\u304b\u308a\u306b\u304f\u304f\u306a\u3063\u305f\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n<p>\u4ee5\u4e0b\u3001UHS\u30e9\u30a4\u30d6\u30e9\u30ea\u5185\u90e8\u306b\u3064\u3044\u3066\u306e\u8a18\u8ff0\u306f\u3001hoboNicola\u7528\u306b\u5b9a\u7fa9\u540d\u3092\u5909\u66f4\u3057\u305f\u30b3\u30fc\u30c9\u306b\u3082\u3068\u3065\u3044\u3066\u3044\u308b\u3002MAX3421E\u306e\u30ec\u30b8\u30b9\u30bf\u69cb\u6210\u3084\u30d3\u30c3\u30c8\u69cb\u6210\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/pdfserv.maximintegrated.com\/jp\/an\/AN3785J.pdf\" target=\"_blank\" rel=\"noopener\">MAX3421E\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30ac\u30a4\u30c9<\/a>\u00a0\u3092\u53c2\u7167\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u65ad\u7247\u306b\u767b\u5834\u3059\u308b <em>regWr()<\/em> \u3084 <em>regRd()<\/em> \u3068\u3044\u3046\u95a2\u6570\u306fUHS\u30e9\u30a4\u30d6\u30e9\u30ea\u5185\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u304a\u308a\u3001SPI \u3092\u4ecb\u3057\u3066MAX3421E\u306e\u30ec\u30b8\u30b9\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3002\u305d\u306e\u5185\u5bb9\u306b\u3064\u3044\u3066\u306f\u3001\u6b21\u56de\u306eUHS\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u3064\u3044\u3066\u306e\u6295\u7a3f\u306b\u8a18\u8f09\u3057\u3066\u3044\u308b\u3002<\/p>\n<h4>\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306b<\/h4>\n<p><strong>Usb.cpp <\/strong>\u306b\u8ffd\u52a0\u3057\u305f\u3001<em>void USBHost::suspendKeyboard()<\/em> \u306b\u3088\u3063\u3066\u30ad\u30fc\u30dc\u30fc\u30c9\u3068MAX3421E\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true \">void USBHost::suspendKeyboard() {\r\n\tuint8_t mode = regRd(rMODE);\r\n\tmode &amp;= ~bmSOFKAENAB;\r\n\tregWr(rMODE, mode);\t\/\/ stop SOF or KeepAlive \r\n\tdelay(5);\r\n\tregWr(rHIRQ, bmSUSDNIRQ); \/\/ clear SUSDNIRQ\r\n\tdelay(5);\r\n\tregWr(rUSBCTL, bmPWRDOWN);\t\/\/ Enter powerdown state of MAX3421\r\n\tdelay(5);\r\n}\r\n<\/pre>\n<p><em>bmSOFKAENAB<\/em> \u3084 <em>bmPWRDOWN<\/em> \u3068\u3044\u3063\u305f\u30b7\u30f3\u30dc\u30eb\u306f\u3001UHS\u30e9\u30a4\u30d6\u30e9\u30ea\u306e <strong>max3421e.h<\/strong> \u5185\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u304a\u308aMAX3421E\u306e\u30ec\u30b8\u30b9\u30bf\u30d3\u30c3\u30c8\u3092\u8868\u3057\u3066\u3044\u308b\u3002<\/p>\n<p><em>rMODE<\/em> (<strong>MODE\u30ec\u30b8\u30b9\u30bf<\/strong>)\u306e <em><strong>SOFKAENAB<\/strong> <\/em>\u30d3\u30c3\u30c8\u3092\u843d\u3068\u3059\u3053\u3068\u3067\u3001MAX3421E\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308bUSB\u30c7\u30d0\u30a4\u30b9\u306b\u5bfe\u3059\u308b<strong>SOF\u30d1\u30b1\u30c3\u30c8\u307e\u305f\u306fKeepAlive\u30d1\u30eb\u30b9\u3092\u505c\u6b62<\/strong>\u3059\u308b\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u591a\u304f\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u306f\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306b\u5165\u308b\u3002<em>SOFKAENAB<\/em> \u30d3\u30c3\u30c8\u30920\u3068\u3057\u305f\u3053\u3068\u3067\u3001<em>SUSDNIRQ<\/em> \u30d3\u30c3\u30c8\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u306a\u306e\u3067\u3001<em>bmSUSDNIRQ<\/em>\u3092\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3067\u30af\u30ea\u30a2\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u3053\u306e\u64cd\u4f5c\u306b\u3088\u308a\u3001QT Py + miniUHS + \u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u6d88\u8cbb\u96fb\u6d41\u306f<strong>\u7d0410.2mA<\/strong>\u307e\u3067\u4e0b\u304c\u308b\u3002\u6700\u521d\u306b\u8f09\u305b\u305f\u8868\u304b\u3089\u3059\u308b\u3068\u5358\u7d14\u30b9\u30ea\u30fc\u30d7\u6642\u304c66.5mA\u3060\u304b\u3089\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u3068\u3059\u308b\u3053\u3068\u3067\u3055\u3089\u306b<strong>56.3mA\u306e\u524a\u6e1b\u52b9\u679c<\/strong>\u304c\u3042\u308b\u3002<\/p>\n<p>\u6b21\u306b <em>USBCTL<\/em>\u30ec\u30b8\u30b9\u30bf\u306e <em>PWRDOWN<\/em>\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u3067\u3001MAX3421E\u81ea\u4f53\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u3068\u3057\u3066\u3044\u308b\u3002\u3053\u308c\u3092\u3084\u308b\u3068\u3001\u6d88\u8cbb\u96fb\u6d41\u306f\u3055\u3089\u306b\u6e1b\u3063\u3066 \u7d042.3mA\u3068\u306a\u308b\u300210.2mA\u3068\u306e\u5dee\u304b\u3089\u3001<strong>MAX3421E\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u6642\u306e\u6d88\u8cbb\u96fb\u6d41\u306f 7.9mA \u7a0b\u5ea6<\/strong>\u3068\u3044\u3046\u3053\u3068\u304c\u63a8\u6e2c\u3067\u304d\u308b\u3002<\/p>\n<p>\u306a\u304a\u3001<a href=\"https:\/\/pdfserv.maximintegrated.com\/jp\/an\/AN3785J.pdf\" target=\"_blank\" rel=\"noopener\">MAX3421E\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30ac\u30a4\u30c9<\/a>\u306b\u3088\u308b\u3068\u3001\u300c\u30db\u30b9\u30c8<br \/>\n\u3068\u3057\u3066\u52d5\u4f5c\u3057\u3066\u3044\u308b\u3068\u304d\u306b\u306f\u3001CPU \u304c <em>POWERDOWN = 1<\/em> \u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300d\u3068\u66f8\u3044\u3066\u3042\u308b\u306e\u3060\u304c\u3001\u8a66\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u7279\u306b\u5bb3\u3082\u306a\u3055\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u63a1\u7528\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306e\u5b9f\u88c5\u306f\u3044\u308d\u3044\u308d\u3068\u8a66\u3059\u305f\u3081\u306b\u4e0a\u8a18\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306b\u3057\u305f\u304c\u3001<span class=\"lang:default highlight:0 decode:true crayon-inline\">regWr(rUSBCTL, bmPWRDOWN);<\/span>\u00a0 \u3068\u3059\u308b\u3060\u3051\u3067 <em>SOFKAENAB<\/em> \u30d3\u30c3\u30c8\u3092\u30af\u30ea\u30a2\u3057\u306a\u304f\u3066\u3082\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u306f\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306b\u5165\u308b\u3002<\/p>\n<h4>\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u30ea\u30b8\u30e5\u30fc\u30e0\u3059\u308b<\/h4>\n<p>\u3084\u306f\u308a<strong>Usb.cpp <\/strong>\u306b\u8ffd\u52a0\u3057\u305f\u3001<em>void USBHost::resumeKeyboard()<\/em> \u306b\u3088\u3063\u3066\u30ad\u30fc\u30dc\u30fc\u30c9\u3068MAX3421E\u306e\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u3092\u89e3\u9664\u3059\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">void USBHost::resumeKeyboard() {\r\n#if 0\r\n\tregWr(rHCTL, bmSIGRSM); \/\/ \r\n\twhile(!(regRd(rHCTL) &amp; bmSIGRSM));\t\/\/ wait for SIGRSM is cleared.\r\n\/\/\twhile(!(regRd(rHIRQ) &amp; bmBUSEVENTIRQ)); \/\/wait for sample operation to finish\r\n#endif\r\n\tregWr(rUSBCTL, 0);\r\n\tdelay(10);\r\n\tuint8_t mode = regRd(rMODE);\r\n\tmode |= bmSOFKAENAB;\r\n\tregWr(rMODE, mode);\r\n\tdelay(10);\r\n}<\/pre>\n<p>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30ac\u30a4\u30c9\u3092\u8aad\u3080\u3068\u3001<em>#if 0 \uff5e #endif<\/em> \u3067\u56f2\u307e\u308c\u305f\u90e8\u5206\u306e\u3088\u3046\u306b <em>SIGRSM<\/em>\u30d3\u30c3\u30c8\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u3067\u30d0\u30b9\u30ec\u30b8\u30e5\u30fc\u30e0\u30a4\u30d9\u30f3\u30c8\u3092\u751f\u6210\u3057\u3001\u30ec\u30b8\u30e5\u30fc\u30e0\u4fe1\u53f7\u306e\u9001\u51fa\u304c\u5b8c\u4e86\u3059\u308b\u306e\u3092\u5f85\u3064\u306e\u304c\u6b63\u3057\u305d\u3046\u306a\u306e\u3060\u304c\u3001\u3053\u308c\u3092\u3084\u3063\u3066\u3082\u30ad\u30fc\u30dc\u30fc\u30c9\u306f\u5fa9\u6d3b\u3057\u306a\u304b\u3063\u305f (MAX3421E\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u3057\u305f\u307e\u307e\u3060\u3063\u305f\u304b\u3089\uff1f)\u3002<\/p>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306b\u3001<em>USBCTL<\/em>\u306b0\u3092\u66f8\u3044\u3066\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u3092\u89e3\u9664\u3057\u3001\u305d\u306e\u5f8c <em>SOFKAENAB<\/em>\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u3067\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u5fa9\u6d3b\u3055\u305b\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<h4>\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1\u3067\u306e\u51e6\u7406<\/h4>\n<p>USB\u306e\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306b\u304b\u304b\u308f\u308bUSB\u7248\u306e\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">void loop() {\r\n  if (is_usb_suspended() ) {\r\n    hobo_nicola.error_led(false);\r\n    hobo_nicola.nicola_led(false);\r\n    if (Settings().is_use_kbd_suspend())\r\n      Usbhost.suspendKeyboard(); \/\/ suspend keyboard and max3421E\r\n    enter_sleep(500);\t\/\/ suspend myself.\r\n    if (Settings().is_use_kbd_suspend())\r\n      Usbhost.resumeKeyboard(); \/\/ resume keyboard and max3421E to poll keyboard\r\n    Usbhost.Task();\t\/\/ check any key pressed.\r\n  } else {\r\n    ....\r\n<\/pre>\n<p><em>is_usb_suspended()<\/em> \u306f\u3001TinyUSB\u30e9\u30a4\u30d6\u30e9\u30ea\u3068Arduino\u30b3\u30a2\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u76f8\u9055\u3092\u30e9\u30c3\u30d7\u3057\u305f(\u30db\u30b9\u30c8\u5074\u306e)USB\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u3092\u691c\u51fa\u3059\u308b\u95a2\u6570\u3002\u30b5\u30b9\u30da\u30f3\u30c9\u306a\u3089\u3070\u3001\u52d5\u4f5c\u8a2d\u5b9a\u306e\u64ec\u4f3c\u30b5\u30b9\u30da\u30f3\u30c9\u304c\u6709\u52b9 ( <em>Settings().is_use_kbd_suspend()<\/em> )\u00a0 \u306e\u3068\u304d <em>Usbhost.suspendKeyboard()<\/em> \u306b\u3088\u3063\u3066MAX3421E\u304a\u3088\u3073\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u3055\u305b\u308b\u3002\u305d\u3057\u3066500msec\u9593\u306e\u30c7\u30a3\u30fc\u30d7\u30b9\u30ea\u30fc\u30d7\u72b6\u614b\u306b\u5165\u308a\u3001\u305d\u306e\u5f8c <em>Usbhost.resumeKeyboard();<\/em> \u306b\u3088\u3063\u3066\u3044\u3063\u305f\u3093\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u5fa9\u6d3b\u3055\u305b\u3001<em>Usbhost.Task()<\/em> \u3092\u547c\u3093\u3067MAX3421E\u306b\u30ad\u30fc\u5165\u529b\u306e\u691c\u51fa\u3092\u3055\u305b\u3066\u3044\u308b\u3002<\/p>\n<p>\u30ad\u30fc\u5165\u529b\u304c\u3042\u3063\u305f\u5834\u5408 <em>Usbhost.Task()<\/em> \u306e\u4e2d\u304b\u3089\u3001\u30b9\u30b1\u30c3\u30c1\u5185\u306b\u5b9f\u88c5\u304c\u3042\u308b<em>KeyboardEvent<\/em>\u30af\u30e9\u30b9\u306e <em>Parse()<\/em> \u304c\u547c\u3070\u308c\u308b\u3002Parse() \u306e\u6700\u521d\u3067\u30db\u30b9\u30c8\u5074\u306b\u30a6\u30a7\u30a4\u30af\u30a2\u30c3\u30d7\u8981\u6c42\u3092\u9001\u308b <em>usb_wakeup();<\/em> \u3092\u5b9f\u884c\u3059\u308b\u306e\u3067\u3001PC\u306f\u30b9\u30ea\u30fc\u30d7\u72b6\u614b\u304b\u3089\u5fa9\u5e30\u3059\u308b\u3002<\/p>\n<p>\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u3055\u305b\u3066\u3044\u308b\u3068\u304d\u3001\u30de\u30a6\u30b9\u306b\u89e6\u3063\u305f\u3053\u3068\u306a\u3069\u5225\u306e\u8981\u56e0\u3067PC\u304c\u30ea\u30b8\u30e5\u30fc\u30e0\u3059\u308b\u3053\u3068\u3082\u8003\u3048\u3089\u308c\u308b\u3002\u305d\u3046\u3044\u3063\u305f\u30b1\u30fc\u30b9\u3067\u3082\u3001<em>enter_sleep(500)<\/em> \u306e\u5f8c\u306e<em>Usbhost.resumeKeyboard()<\/em> \u306f\u5fc5\u305a\u5b9f\u884c\u3055\u308c\u308b\u306e\u3067\u3001MAX3421E\u3084\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u30b5\u30b9\u30da\u30f3\u30c9\u72b6\u614b\u306b\u7559\u307e\u308b\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u3002<\/p>\n<h1>\u304d\u3087\u3046\u306e\u307e\u3068\u3081<\/h1>\n<p>USB\u7248\u306ehoboNicola\u30e9\u30a4\u30d6\u30e9\u30ea1.6.1\u7248\u306f\u3001\u4ee5\u4e0b\u306e3\u90e8\u5206\u304c\u30de\u30a4\u30b3\u30f3\u4f9d\u5b58\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u304a\u306e\u304a\u306e\u5207\u308a\u5206\u3051\u3066\u5b9f\u88c5\u3057\u3066\u3044\u308b\u3002<\/p>\n<ul>\n<li>\u7701\u96fb\u6d41(\u30b9\u30ea\u30fc\u30d7\u7d61\u307f)<\/li>\n<li>\u8a2d\u5b9a\u306e\u4fdd\u5b58(EEPROM\u3001FlashStorage,\u00a0 InternalFS)<\/li>\n<li>SPI (miniUHS = MAX3421E\u3068\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9)<\/li>\n<\/ul>\n<p>\u4eca\u56de\u306f\u7701\u96fb\u6d41\u306e\u8a71\u3067\u3057\u305f\u3002\u4ed6\u306e\u8a71\u3082\u5fd8\u308c\u306a\u3044\u3046\u3061\u306b\u65e9\u304f\u307e\u3068\u3081\u3066\u304a\u304f\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>hoboNicola\u30a2\u30c0\u30d7\u30bf\u30fc\u306e\u6d88\u8cbb\u96fb\u6d41 \u96fb\u6c17\u3092\u5927\u5207\u306b\u306d\uff01 \u3068\u3044\u3046\u3053\u3068\u3067 hoboNicola 1.6.1 \u3067\u5b9a\u5e38\u52d5\u4f5c\u6642\u3084\u30b9\u30ea\u30fc\u30d7\u6642\u306e\u6d88\u8cbb\u96fb\u6d41\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u5de5\u592b\u306e\u8a71\u3002 \u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3054\u3068\u306e\u6d88\u8cbb\u96fb\u6d41 USB\u7248\u306ehoboNi &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=14493\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">hoboNicola\u30a2\u30c0\u30d7\u30bf\u30fc\u306e\u6d88\u8cbb\u96fb\u6d41\u3092\u6e1b\u3089\u3057\u305f\u65b9\u6cd5<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,69],"tags":[65,151,164,166,167,194,190],"class_list":["post-14493","post","type-post","status-publish","format-standard","hentry","category-pc","category-programming","tag-arduino","tag-hobonicola","tag-isp1807","tag-miniuhs","tag-nrf52","tag-samd21","tag-usb"],"_links":{"self":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14493"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14493\/revisions"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}