{"id":1713,"date":"2022-09-10T12:48:33","date_gmt":"2022-09-10T03:48:33","guid":{"rendered":"https:\/\/machiaworx.net\/?p=1713"},"modified":"2022-09-10T19:12:00","modified_gmt":"2022-09-10T10:12:00","slug":"%e3%83%8f%e3%83%bc%e3%83%89%e3%82%b7%e3%83%bc%e3%82%b1%e3%83%b3%e3%82%b5%e9%96%8b%e7%99%ba%e3%80%82%ef%bc%88%e3%81%9d%e3%81%ae%ef%bc%99%ef%bc%9a%e5%88%a5%e3%81%ae%e6%b6%b2%e6%99%b6%e3%82%92%e8%a9%a6","status":"publish","type":"post","link":"https:\/\/machiaworx.net\/?p=1713","title":{"rendered":"\u30cf\u30fc\u30c9\u30b7\u30fc\u30b1\u30f3\u30b5\u958b\u767a\u3002\uff08\u305d\u306e\uff19\uff1a\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u8868\u793a\u306e\u52d5\u4f5c\u78ba\u8a8d\uff13\uff09"},"content":{"rendered":"<p>\u4eca\u5229\u7528\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u306e\u304c\u30e2\u30ce\u30af\u30ed\u6db2\u6676\u3067\u89e3\u50cf\u5ea6\u306b\u5236\u7d04\u304c\u3042\u308b\u305f\u3081\u3001<br \/>\n\u4ed6\u306e\u30e2\u30cb\u30bf\u304c\u4f7f\u3048\u306a\u3044\u304b\u3068\u8003\u3048\u3066\u8a66\u3057\u3066\u307f\u3066\u308b\u3002<\/p>\n<p>\u30b5\u30a4\u30ba\u7684\u306bRaspberryPiPico\u306b\u88c5\u7740\u3059\u308b\u60f3\u5b9a\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u304c\u3042\u308b\u306e\u3067\u3053\u308c\u304c\u4f7f\u3048\u308b\u3068\u4fbf\u5229\u3002<\/p>\n<p><a href=\"https:\/\/www.switch-science.com\/catalog\/7328\/\">Raspberry Pi Pico\u7528 1.8\u30a4\u30f3\u30c1 \u6db2\u6676\u30e2\u30b8\u30e5\u30fc\u30eb 160\u00d7128 &#8211; \u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9 (switch-science.com)<\/a><\/p>\n<p>\u5272\u3068\u697d\u306b\u52d5\u4f5c\u78ba\u8a8d\u304c\u3067\u304d\u305f\u3002\uff08\u524d\u56de\u307f\u305f\u3044\u306b\u30aa\u30fc\u30c7\u30a3\u30aa\u306b\u95a2\u3059\u308b\u30d4\u30f3\u306e\u8ffd\u52a0\u5b9f\u88c5\u304c\u5fc5\u8981\u3060\u3068\u9762\u5012\u306a\u306e\u3067\uff09<\/p>\n<h3>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h3>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n#include &lt;Adafruit_GFX.h&gt;; \/\/ Core graphics library\r\n#include &lt;Adafruit_ST7735.h&gt;; \/\/ Hardware-specific library for ST7735\r\n#include &lt;SPI.h&gt;;\r\n#include &lt;U8g2_for_Adafruit_GFX.h&gt;;\r\n\r\n\/\/#define TFT_MOSI 23(sda)\r\n\/\/#define TFT_SCLK 18(scl)\r\n\r\n\/*\r\nDC:8\r\nCS:9\r\nLCD_CLK:10\r\nLCD_DIN:11\r\nLCD_RST:12\r\nLCD_BL:13\r\n*\/\r\n#define TFT_CS D9 \/\/ Chip select control pin\r\n#define TFT_DC D8 \/\/ Data Command control pin\r\n#define TFT_RST D12 \/\/ Reset pin (could connect to RST pin)\r\n\r\n\/\/Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);\r\nAdafruit_ST7735 tft\r\n= Adafruit_ST7735(TFT_CS, TFT_DC, D11, D10, TFT_RST);\r\n\/\/Adafruit_ST7735(int8_t CS, int8_t RS, int8_t SID, int8_t SCLK, int8_t RST = -1);\r\nU8G2_FOR_ADAFRUIT_GFX u8g2_for_adafruit_gfx;\r\n\r\nvoid setup(void) {\r\n  tft.initR(INITR_BLACKTAB); \/\/ Init ST7735S chip, black tab\r\n  tft.setRotation(0);\r\n  tft.fillScreen(ST77XX_BLACK);\r\n  u8g2_for_adafruit_gfx.begin(tft);\r\n}\r\n\r\nvoid loop() {\r\n  u8g2_for_adafruit_gfx.setFontMode(0); \/\/ use u8g2 none transparent mode\r\n  u8g2_for_adafruit_gfx.setFontDirection(0); \/\/ left to right (this is default)\r\n  u8g2_for_adafruit_gfx.setForegroundColor(ST77XX_YELLOW); \/\/ apply Adafruit GFX color\r\n  u8g2_for_adafruit_gfx.setFont(u8g2_font_wqy14_t_gb2312 ); \/\/ select u8g2 font from here: https:\/\/github.com\/olikraus\/u8g2\/wiki\/fntlistall\r\n  u8g2_for_adafruit_gfx.setCursor(20, 20); \/\/ start writing at this position\r\n  u8g2_for_adafruit_gfx.print(&quot;Hello,world&quot;);\r\n  delay(1000);\r\n}\r\n\r\n\r\n<\/pre>\n<p>\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306b\u3064\u3044\u3066\u306fSPI\u901a\u4fe1\u3067\u52d5\u4f5c\u78ba\u8a8d\u304c\u3067\u304d\u305f\u3002<br \/>\n\u307e\u305f\u3001ST7735S\u3068\u3044\u3046TFT\u6db2\u6676\u306e\u30c9\u30e9\u30a4\u30d0\u304c\u5fc5\u8981\u306e\u305f\u3081\u3001\u3053\u308c\u306b\u5bfe\u5fdc\u3059\u308b\u30c9\u30e9\u30a4\u30d0\u3092\u5229\u7528\u3059\u308b\u3002<\/p>\n<p>\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306e\u8868\u793a\u6a5f\u69cb\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u3092\u5229\u7528\u3002<\/p>\n<ul>\n<li>U8G2 for Adafruit_GFX\uff1a\u30c6\u30ad\u30b9\u30c8\u8868\u793a\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3002<br \/>\n\u5143\u3005\u30e2\u30ce\u30af\u30ed\u7528\u3060\u3051\u3069\u3001\u672c\u5bb6\u3068\u5206\u5272\u3057\u3066\u30ab\u30e9\u30fc\u6db2\u6676\u7528\u306b\u4f5c\u6210\u3055\u308c\u3066\u308b<br \/>\n<a href=\"https:\/\/github.com\/olikraus\/U8g2_for_Adafruit_GFX\">olikraus\/U8g2_for_Adafruit_GFX: Add U8g2 fonts to any Adafruit GFX based graphics library. (github.com)<\/a><\/li>\n<li>Adafruit_GFX\uff1a\u30ab\u30e9\u30fc\u6db2\u6676\u7528\u63cf\u753b\u30e9\u30a4\u30d6\u30e9\u30ea<br \/>\n<a href=\"https:\/\/learn.adafruit.com\/adafruit-gfx-graphics-library\">Overview | Adafruit GFX Graphics Library | Adafruit Learning System<\/a><\/li>\n<\/ul>\n<p>\u554f\u984c\u306a\u306e\u304c\u3001\u30d4\u30f3\u306e\u5b9a\u7fa9\u306e\u65b9\u6cd5\u304cRP2040\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3068\u3053\u308d\u3002\uff08\u30e9\u30a4\u30d6\u30e9\u30ea\u5074\u306e\u554f\u984c\u3068\u601d\u6599\uff09<br \/>\nRP2040\u306f\u5168\u90e8\u30c7\u30b8\u30bf\u30eb\u30d4\u30f3\u3068\u3057\u3066\u51e6\u7406\u3067\u304d\u308b\u306e\u3067\u3001\u300cDxx\u300d\u3068\u3044\u3046\u5f62\u3067\u8a18\u8ff0\u3059\u308c\u3070\u8a8d\u8b58\u53ef\u80fd\u3002<\/p>\n<p>RP2040\u306f\u30c7\u30b8\u30bf\u30eb\u30fb\u30a2\u30ca\u30ed\u30b0\u3068\u3044\u3046\u533a\u5225\u306b\u4e4f\u3057\u3044\u306e\u3067\u3001\u3053\u3046\u3044\u3046\u3068\u3053\u308d\u3067\u3064\u307e\u305a\u304f\u6c17\u304c\u3057\u3066\u308b\u3002<\/p>\n<h3>\u53c2\u8003\u8cc7\u6599<\/h3>\n<p><a href=\"https:\/\/github.com\/olikraus\/U8g2_for_Adafruit_GFX\/issues\/18\">st7735 support \u00b7 Issue #18 \u00b7 olikraus\/U8g2_for_Adafruit_GFX (github.com)<\/a><\/p>\n<p><a href=\"https:\/\/qiita.com\/eggman\/items\/a88fa8fadee3cc96af41\">Adafruit 1.8&#8243; SPI display \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u3080 &#8211; Qiitaj<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5229\u7528\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u306e\u304c\u30e2\u30ce\u30af\u30ed\u6db2\u6676\u3067\u89e3\u50cf\u5ea6\u306b\u5236\u7d04\u304c\u3042\u308b\u305f\u3081\u3001 \u4ed6\u306e\u30e2\u30cb\u30bf\u304c\u4f7f\u3048\u306a\u3044\u304b\u3068\u8003\u3048\u3066\u8a66\u3057\u3066\u307f\u3066\u308b\u3002 \u30b5\u30a4\u30ba\u7684\u306bRaspberryPiPico\u306b\u88c5\u7740\u3059\u308b\u60f3\u5b9a\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u304c\u3042\u308b\u306e\u3067\u3053\u308c\u304c\u4f7f\u3048\u308b\u3068\u4fbf\u5229\u3002 Rasp&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/machiaworx.net\/?p=1713\" class=\"more-link read-more\" rel=\"bookmark\"><span class=\"screen-reader-text\">\u30cf\u30fc\u30c9\u30b7\u30fc\u30b1\u30f3\u30b5\u958b\u767a\u3002\uff08\u305d\u306e\uff19\uff1a\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u8868\u793a\u306e\u52d5\u4f5c\u78ba\u8a8d\uff13\uff09<\/span><i class=\"fa fa-arrow-right\"><\/i> \u306e\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,23,4],"tags":[],"class_list":["post-1713","post","type-post","status-publish","format-standard","hentry","category-synth-dev","category-embed","category-pgm"],"_links":{"self":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/1713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1713"}],"version-history":[{"count":10,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/1713\/revisions"}],"predecessor-version":[{"id":1724,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/1713\/revisions\/1724"}],"wp:attachment":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}