{"id":3578,"date":"2018-05-21T13:25:46","date_gmt":"2018-05-21T04:25:46","guid":{"rendered":"http:\/\/www.ois-yokohama.co.jp\/oisblog\/?p=3578"},"modified":"2019-01-11T15:13:56","modified_gmt":"2019-01-11T06:13:56","slug":"mbed-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9f%e3%83%ad%e3%83%9c%e3%83%83%e3%83%88%e4%bd%9c%e6%88%90%e3%80%80%e7%ac%ac3%e5%9b%9e","status":"publish","type":"post","link":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/archives\/3578","title":{"rendered":"mbed \u3092\u4f7f\u3063\u305f\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210\u3000\u7b2c3\u56de"},"content":{"rendered":"<div class=\"veu_autoEyeCatchBox\"><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"544\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03.png\" class=\"attachment-large size-large wp-post-image\" alt=\"\u30de\u30a4\u30b3\u30f3\u30dd\u30fc\u30c8\u306b\u63a5\u7d9a\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03.png 726w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03-300x225.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/div>\n<h2><strong>\u3010LCD\u306b\u4f55\u304b\u51fa\u3057\u3066\u307f\u308b\u3011<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<h3>\u306f\u3058\u3081\u306b<\/h3>\n<p>\u7686\u3055\u3093\u304c\u63a5\u3057\u3066\u3044\u308b\u6b86\u3069\u306e\u30c7\u30b8\u30bf\u30eb\u6a5f\u5668\u306b\u306f\u3001\u30e6\u30fc\u30b6\u306b\u4f55\u304b\u3092\u4f7f\u3066\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u7c21\u5358\u306a\u3082\u306e\u3060\u3068LED\u3067\u3059\u3002LED\u306e\u70b9\u706f\u3057\u3066\u3044\u308b\u8272\u3084\u70b9\u6ec5\u3057\u3066\u3044\u308b\u611f\u899a\u306a\u306e\u3067\u3001\u305d\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u691c\u77e5\u3057\u3066\u3044\u308b\u72b6\u614b\u3092\u30e6\u30fc\u30b6\u30fc\u306b\u4f1d\u3048\u3066\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30b9\u30de\u30db\u306a\u3069\u306e\u30cf\u30a4\u30b9\u30da\u30c3\u30af\u306a\u6a5f\u5668\u3067\u306f\u3001\u30b0\u30e9\u30d5\u30a3\u30ab\u30eb\u306a\u8868\u793a\u3067\u753b\u9762\u304c\u3042\u3063\u305f\u308a\u3001\u30bf\u30c3\u30c1\u64cd\u4f5c\u306b\u3088\u308a\u3001\u6a5f\u5668\u306e\u5236\u5fa1\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u73fe\u5728\u4f5c\u6210\u3057\u3066\u3044\u308b\u30ed\u30dc\u30c3\u30c8\u3067\u306f\u3001LED\u306e\u70b9\u6ec5\u304f\u3089\u3044\u3057\u304b\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u4f55\u304b\u8868\u793a\u3092\u8a66\u307f\u3088\u3046\u3068\u8272\u3005\u63a2\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u300116\u6587\u5b57\u00d72\u884c\u306b\u5bfe\u5fdc\u3057\u305fLCD\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u3053\u308c\u3092\u5236\u5fa1\u3057\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3>LCD\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066<\/h3>\n<p>\u4eca\u56de\u4f7f\u7528\u3059\u308bLCD\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30c7\u30fc\u30bf\u8ee2\u9001\u304c8\u30d3\u30c3\u30c8\u30684\u30d3\u30c3\u30c8\u306e\u3044\u305a\u308c\u304b\u3092\u9078\u629e\u3067\u304d\u307e\u3059\u3002\u30de\u30a4\u30b3\u30f3\u5074\u306e\u7a7a\u304d\u30dd\u30fc\u30c8\u306e\u95a2\u4fc2\u4e0a\u30014\u30d3\u30c3\u30c8\u306e\u30c7\u30fc\u30bf\u8ee2\u9001\u65b9\u5f0f\u3092\u9078\u629e\u3057\u307e\u3057\u305f\u3002<br \/>\n\u307e\u305f\u3001\u53ef\u5909\u62b5\u6297\u3092\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\nLCD\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u8a73\u7d30\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<\/p>\n<table border=\"1\" width=\"100%\">\n<tbody>\n<tr>\n<td>\u88fd\u54c1\u540d<\/td>\n<td>16\u6587\u5b57\u00d72\u884c \u8d85\u30cf\u30a4\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u5927\u6587\u5b57LCD\u30e2\u30b8\u30e5\u30fc\u30eb<\/td>\n<\/tr>\n<tr>\n<td>\u30e1\u30fc\u30ab\u30fc<\/td>\n<td>Sunlike Display Tech. Corp.<\/td>\n<\/tr>\n<tr>\n<td>\u578b\u756a<\/td>\n<td>SC1602BS*B(LCD\u30d0\u30c3\u30af\u30e9\u30a4\u30c8\u7121)<\/td>\n<\/tr>\n<tr>\n<td>\u6982\u8981<\/td>\n<td>1.\u30005\u00d77\u30c9\u30c3\u30c8\uff0b\u30ab\u30fc\u30bd\u30eb\u8868\u793a2.\u3000\u6db2\u6676\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u5185\u8535<br \/>\n3.\u30005V\u5358\u4e00\u96fb\u6e90(\u8247\u6d88\u8cbb\u96fb\u6d41)<br \/>\n4.\u30001\/16\u30c7\u30e5\u30fc\u30c6\u30a3\u30b5\u30a4\u30af\u30eb<\/td>\n<\/tr>\n<tr>\n<td>\u5024\u6bb5<\/td>\n<td>500\u5186(\u79cb\u6708\u96fb\u5b50\u901a\u5546\u8abf\u3079)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u96fb\u529b\u306b\u5fc5\u8981\u306a5V\u96fb\u6e90\u3068GND\u306f\u3001\u30de\u30a4\u30b3\u30f3\u306e\u96fb\u5727\u4ed5\u69d8\u3068\u540c\u3058\u306a\u306e\u3067\u305d\u3053\u304b\u3089\u76d7\u307f\u53d6\u3063\u3066\u63a5\u7d9a\u3057\u307e\u3059\u3001Vo\uff08\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u8abf\u6574\u96fb\u5727\uff09\u306f\u96fb\u6e90\u304b\u3089\u53ef\u5909\u62b5\u6297\uff0810K\u03a9\uff09\u3092\u4ecb\u3057\u3066\u63a5\u7d9a\u3057\u307e\u3059\u3002<br \/>\nR\/W\u4fe1\u53f7\u306fWrite\u56fa\u5b9a\u306e\u70ba\u3001GND\u3078\u63a5\u7d9a\u3002RS\uff08Register Select)\u53ca\u3073E\uff08Enable Signal),Data0\uff5eData3\u3092\u30de\u30a4\u30b3\u30f3\u306e\u30dd\u30fc\u30c8\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3584 size-full\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03.png\" alt=\"\u30de\u30a4\u30b3\u30f3\u30dd\u30fc\u30c8\u306b\u63a5\u7d9a\" width=\"726\" height=\"544\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03.png 726w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03-300x225.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><br \/>\nmbed\u3068\u306e\u63a5\u7d9a\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3585 size-full\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03-a.png\" alt=\"mbed\u3068\u306e\u63a5\u7d9a\" width=\"556\" height=\"281\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03-a.png 556w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed03-a-300x152.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/p>\n<h3>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306b\u3064\u3044\u3066<\/h3>\n<p>\u958b\u767a\u74b0\u5883\u306f\u3001\u300c<a href=\"http:\/\/www.ois-yokohama.co.jp\/oisblog\/archives\/2505\" target=\"_blank\" rel=\"noopener\">mbed\u3092\u4f7f\u3063\u305f\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210 \u7b2c1\u56de<\/a>\u300d\u3067\u3054\u7d39\u4ecb\u3057\u305f\u300cARM\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u30b3\u30f3\u30d1\u30a4\u30eb\u74b0\u5883\u300d\u3092\u4f7f\u3063\u3066\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\nLCD\u30c7\u30d0\u30a4\u30b9\u5236\u5fa1\u7528\u306e\u30c9\u30e9\u30a4\u30d0\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u3001\u30c7\u30d0\u30a4\u30b9\u306b\u7279\u5316\u3057\u305f\u5236\u5fa1\u306f\u3053\u306e\u30af\u30e9\u30b9\u306b\u5438\u53ce\u3055\u305b\u307e\u3059\u3002\u5229\u7528\u3059\u308b\u5074\u304b\u3089\u306f\u30c9\u30e9\u30a4\u30d0\u30af\u30e9\u30b9\u306eprintf\u7b49\u306e\u51fa\u529b\u6a5f\u80fd\u3060\u3051\u3067\u8868\u793a\u5236\u5fa1\u3067\u304d\u305f\u65b9\u304c\u4fbf\u5229\u306a\u306e\u3067\u3001Stream\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3055\u305b\u305f\u30af\u30e9\u30b9\u3068\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>TextPanel.h<\/p>\n<pre class=\"lang:default highlight:0 decode:true\" title=\"TextPanel.h\">#ifndef _TEXTPANEL_H_\r\n#define _TEXTPANEL_H_\r\n#include \"mbed.h\"\r\n\/*\r\n * Text LCD Panel (SC1602BS*B) Access Driver\r\n *\/\r\nclass TextPanel : public Stream {\r\npublic:\r\n    TextPanel(PinName regsel ,PinName enable,PinName data0 ,PinName data1 ,PinName data2 ,PinName data3 );\r\n    void clearScreen();\r\n    void positionSet(int column, int row);\r\nprotected:\r\n    DigitalOut _regsel, _enable;\r\n    BusOut _data;\r\n    int _column;\r\n    int _row;\r\n    \/* Stream implementation functions *\/\r\n    virtual int _putc(int value);\r\n    virtual int _getc();\r\n    void byteWrite( int value );\r\n    void commandWrite( int command );\r\n    void dataWrite( int data );\r\n    int addressConvert(int column, int row);\r\n    void charSend(int column, int row, int c);\r\n};\r\n#endif \/* _TEXTPANEL_H_ *\/<\/pre>\n<p>TextPanel.cpp<\/p>\n<pre class=\"lang:default highlight:0 decode:true \" title=\"TextPanel.cpp\">#include \"TextPanel.h\"\r\n#include \"mbed.h\"\r\n\/* define *\/\r\n#define TEXT_LCD_ROW_MAX 2   \/* TEXT LCD ROW MAX *\/\r\n#define TEXT_LCD_COL_MAX 16  \/* TEXT LCD COL MAX *\/\r\n#define REG_SEL_HI       1   \/* Register Select High *\/\r\n#define REG_SEL_LO       0   \/* Register Select Low *\/\r\n#define ENABLE_SIG_HI    1   \/* Enable Signal High *\/\r\n#define ENABLE_SIG_LO    0   \/* Enable Signal Low *\/\r\n\/*******************************************\/\r\n\/* Constructer                             *\/\r\n\/* param regsel Register Select\u4fe1\u53f7\u30dd\u30fc\u30c8  *\/\r\n\/* param enable Enable \u4fe1\u53f7\u30dd\u30fc\u30c8          *\/\r\n\/* param data0-3 :\u30c7\u30fc\u30bf\u4fe1\u53f7\u30dd\u30fc\u30c8         *\/\r\n\/*******************************************\/\r\nTextPanel::TextPanel(PinName regsel , PinName enable , PinName data0 , PinName data1 , PinName data2 ,PinName data3 ):\r\n                     _regsel(regsel),_enable( enable ),_data( data0, data1, data2, data3 ){\r\n   int count = 0;\r\n    \/* command mode set *\/\r\n    _enable = ENABLE_SIG_HI;\r\n    _regsel = REG_SEL_LO;\r\n    \/* Wait *\/\r\n    wait( 0.016 ); \/* 16msec wait for powered up *\/\r\n    \/* 10msec *\/\r\n    \/* init seq:send 0x3 3times(4bit interface) *\/\r\n    for( count = 0 ; count &lt; 3 ; count++ ){\r\n        byteWrite( 0x3 );\r\n        wait( 0.00164 ); \/* 1.64ms wait *\/\r\n    }\r\n    byteWrite( 0x2 ); \/* 4-bit mode *\/\r\n    wait( 0.000040f ); \/* 40usec wait *\/\r\n    commandWrite( 0x28 ); \/* Function Set DL:0(4bit) N:1(2Line) F:5*7dot *\/\r\n    commandWrite( 0x0C ); \/* Disable ON\/OFF Control *\/\r\n    commandWrite( 0x06 ); \/* Entry Mode Set Increment *\/\r\n    clearScreen();\r\n}\r\n\/**********************************\/\r\n\/* \u30b9\u30af\u30ea\u30fc\u30f3\u3092\u30af\u30ea\u30a2\u3059\u308b         *\/\r\n\/* param:\u7121\u3057                     *\/\r\n\/* return:\u7121\u3057                    *\/\r\n\/**********************************\/\r\nvoid TextPanel::clearScreen(){\r\n    commandWrite( 0x01 ); \/* Clear Display *\/\r\n    wait( 0.00164 );\r\n}\r\n\/************************************\/\r\n\/* \u30c7\u30d0\u30a4\u30b9\u306b\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3059\u308b       *\/\r\n\/* param:value \u8ee2\u9001\u3059\u308b\u30c7\u30fc\u30bf(byte) *\/\r\n\/* return:\u7121\u3057                      *\/\r\n\/************************************\/\r\nvoid TextPanel::byteWrite( int value ) {\r\n    \/* Uppwer 4bit Send *\/\r\n    _data = value &gt;&gt; 4;\r\n    wait(0.000040f);   \/* 40us wait *\/\r\n    _enable = ENABLE_SIG_LO;\r\n    wait(0.000040f);   \/* 40us wait *\/\r\n    _enable = ENABLE_SIG_HI;\r\n    \/* Lower 4bit Send *\/\r\n    _data = value &gt;&gt; 0;\r\n    wait(0.000040f);   \/* 40us wait *\/\r\n    _enable = ENABLE_SIG_LO;\r\n    wait(0.000040f);   \/* 40us wait *\/\r\n    _enable = ENABLE_SIG_HI;\r\n}\r\n\/**********************************\/\r\n\/* \u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u8ee2\u9001\u51e6\u7406         *\/\r\n\/* param:command \u8ee2\u9001\u3059\u308b\u30b3\u30de\u30f3\u30c9 *\/\r\n\/* return:\u7121\u3057                    *\/\r\n\/**********************************\/\r\nvoid TextPanel::commandWrite( int command ) {\r\n    _regsel = REG_SEL_LO;\r\n    byteWrite( command );\r\n}\r\n\/**********************************\/\r\n\/* \u30c7\u30fc\u30bf\u8ee2\u9001\u51e6\u7406                 *\/\r\n\/* param:data \u8ee2\u9001\u3059\u308b\u30c7\u30fc\u30bf      *\/\r\n\/* return:\u7121\u3057                    *\/\r\n\/**********************************\/\r\nvoid TextPanel::dataWrite( int data ){\r\n    _regsel = REG_SEL_HI;\r\n    byteWrite( data );\r\n}\r\n\/**********************************\/\r\n\/* \u884c\u30fb\u5217\u60c5\u5831 \u30b3\u30de\u30f3\u30c9\u5909\u63db        *\/\r\n\/* param:column \u51fa\u529b\u5148:\u5217\u4f4d\u7f6e     *\/\r\n\/* param:row    \u51fa\u529b\u5148:\u884c\u4f4d\u7f6e     *\/\r\n\/* return:\u8ee2\u9001\u30b3\u30de\u30f3\u30c9            *\/\r\n\/**********************************\/\r\nint TextPanel::addressConvert(int column, int row) {\r\n    return 0x80 + (row * 0x40) + column;\r\n}\r\n\/**********************************\/\r\n\/* \u6587\u5b57\u30c7\u30fc\u30bf\u306e\u8ee2\u9001\u3092\u884c\u3046         *\/\r\n\/* param:column \u51fa\u529b\u5148:\u5217\u4f4d\u7f6e     *\/\r\n\/* param:row    \u51fa\u529b\u5148:\u884c\u4f4d\u7f6e     *\/\r\n\/* param:c\u3000\u3000  \u9001\u4fe1\u3059\u308b\u6587\u5b57\u30b3\u30fc\u30c9*\/\r\n\/* return:\u7121\u3057                    *\/\r\n\/**********************************\/\r\nvoid TextPanel::charSend(int column, int row, int c) {\r\n    int a = addressConvert( column, row ); \/* \u8868\u793a\u4f4d\u7f6e\u8a08\u7b97\u30b3\u30de\u30f3\u30c9\u306e\u751f\u6210 *\/\r\n    commandWrite( a ); \/* \u51fa\u529b\u5148\u8ee2\u9001 *\/\r\n    dataWrite( c );    \/* \u8868\u793a\u30c7\u30fc\u30bf\u8ee2\u9001 *\/\r\n}\r\n\/**********************************\/\r\n\/* 1\u6587\u5b57\u5206\u306e\u30c7\u30fc\u30bf\u8ee2\u9001\u3092\u884c\u3046      *\/\r\n\/* param:value \u9001\u4fe1\u3059\u308b\u6587\u5b57\u30b3\u30fc\u30c9 *\/\r\n\/* return:\u9001\u4fe1\u3057\u305f\u6587\u5b57\u30b3\u30fc\u30c9      *\/\r\n\/**********************************\/\r\nint TextPanel::_putc(int value) {\r\n    \/* \u6539\u884c\u30b3\u30fc\u30c9\uff1f *\/\r\n    if (value == '\\n') {\r\n        _column = 0;\r\n        _row++;\r\n        \/* \u6700\u7d42\u884c\u306e\u5834\u5408 *\/\r\n        if (_row &gt;= TEXT_LCD_ROW_MAX ) {\r\n            _row = 0;\r\n        }\r\n    \/* \u6539\u884c\u30b3\u30fc\u30c9\u4ee5\u5916 *\/\r\n    } else {\r\n        \/* 1\u6587\u5b57\u5206\u30c7\u30fc\u30bf\u8ee2\u9001 *\/\r\n        charSend(_column, _row, value);\r\n        _column++;\r\n        \/* \u884c\u7aef\u306b\u9054\u3057\u305f\u5834\u5408 *\/\r\n        if (_column &gt;= TEXT_LCD_COL_MAX ) {\r\n            _column = 0;\r\n            _row++;\r\n            \/* \u6700\u7d42\u884c\u306e\u5834\u5408 *\/\r\n            if (_row &gt;= TEXT_LCD_ROW_MAX ) {\r\n                _row = 0;\r\n            }\r\n        }\r\n    }\r\n    return value;\r\n}\r\n\/**********************************\/\r\n\/* \u5165\u529b\u6587\u5b57\u306e\u53d6\u5f97\u306f\u884c\u308f\u306a\u3044       *\/\r\n\/* param \u7121\u3057                     *\/\r\n\/* return -1(\u5e38\u306b)                *\/\r\n\/**********************************\/\r\nint TextPanel::_getc() {\r\n    return -1;\r\n}\r\n\/**********************************\/\r\n\/* \u51fa\u529b\u4f4d\u7f6e\u3092\u5909\u66f4\u3059\u308b             *\/\r\n\/* param column \u51fa\u529b\u4f4d\u7f6e \u5217       *\/\r\n\/* param row \u51fa\u529b\u4f4d\u7f6e \u884c          *\/\r\n\/* return \u7121\u3057                    *\/\r\n\/**********************************\/\r\nvoid TextPanel::positionSet(int column, int row) {\r\n    _column = column;\r\n    _row = row;\r\n}<\/pre>\n<p>main.cpp<\/p>\n<pre class=\"lang:default highlight:0 decode:true \" title=\"main.cpp\">#include \"mbed.h\"\r\n#include \"TextPanel.h\"\r\n#if 1\r\nTextPanel lcd(D11, PC_9, D12, D13, D14, D15 ); \/\/ rs, e, d4-d7\r\n#else\r\nTextLCD lcd(PA_7, PC_9, PA_6, PA_5, PB_9, PB_8 ); \/\/ rs, e, d4-d7\r\n#endif\r\nDigitalOut myled(LED2);\r\nint main() {\r\n    wait(0.001);\r\n    lcd.clearScreen(); wait(0.001);\r\n    lcd.positionSet(0, 0);\r\n    lcd.printf( \"TESTtestTest\\n\");\r\n    int iCounter = 0;\r\n    while(1) {\r\n        lcd.positionSet(0, 1);\r\n        lcd.printf( \"%d\",iCounter);\r\n        iCounter++;\r\n        wait(1.0);\r\n        myled = 1; \/\/ LED is ON\r\n        wait(1.0); \/\/ 200 ms\r\n        myled = 0; \/\/ LED is OFF\r\n        wait(1.0); \/\/ 1 sec\r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p>&nbsp;<\/p>\n<div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-3578-1\" width=\"640\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed_003_blog_v03.mp4?_=1\" \/><a href=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed_003_blog_v03.mp4\">https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/05\/mbed_003_blog_v03.mp4<\/a><\/video><\/div>\n<p>\u7c21\u5358\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3088\u308b\u30dd\u30fc\u30c8\u5236\u5fa1\u3067<br \/>\n\u30de\u30a4\u30b3\u30f3\u304b\u3089LCD\u306e\u8868\u793a\u5236\u5fa1\u304c\u3067\u304d\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u56de\u306fUSB\u30dd\u30fc\u30c8\u306b\u3064\u3044\u3066\u5236\u5fa1\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3010\u53c2\u8003\u3011<br \/>\n<a href=\"http:\/\/www.ois-yokohama.co.jp\/oisblog\/archives\/2505\" target=\"_blank\" rel=\"noopener\">mbed\u3092\u4f7f\u3063\u305f\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210\u3000\u7b2c1\u56de<\/a><br \/>\n<a href=\"http:\/\/www.ois-yokohama.co.jp\/oisblog\/archives\/3048\" target=\"_blank\" rel=\"noopener\">mbed\u3092\u4f7f\u3063\u305f\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210\u3000\u7b2c2\u56de<\/a><\/p>\n<p style=\"color: #666666;\">\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3000<a style=\"color: #000000;\" href=\"http:\/\/www.ois-yokohama.co.jp\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">http:\/\/www.ois-yokohama.co.jp<\/span><\/a><\/p>\n<p style=\"color: #666666;\">facebook\u3000\u3000\u3000<a style=\"color: #000000;\" href=\"https:\/\/www.facebook.com\/orientalinformationservice\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">https:\/\/www.facebook.com\/orientalinformationservice\/<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010LCD\u306b\u4f55\u304b\u51fa\u3057\u3066\u307f\u308b\u3011 &nbsp; \u306f\u3058\u3081\u306b \u7686\u3055\u3093\u304c\u63a5\u3057\u3066\u3044\u308b\u6b86\u3069\u306e\u30c7\u30b8\u30bf\u30eb\u6a5f\u5668\u306b\u306f\u3001\u30e6\u30fc\u30b6\u306b\u4f55\u304b\u3092\u4f7f\u3066\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u7c21\u5358\u306a\u3082\u306e\u3060\u3068LED\u3067\u3059\u3002LED\u306e\u70b9\u706f\u3057\u3066\u3044\u308b\u8272\u3084\u70b9\u6ec5\u3057\u3066\u3044\u308b\u611f\u899a\u306a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3584,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"vkexunit_cta_each_option":"","footnotes":""},"categories":[106,13,6],"tags":[530,531,105],"class_list":["post-3578","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-106","category-13","category-engineer","tag-arm","tag-lcd","tag-mbed"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/3578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/comments?post=3578"}],"version-history":[{"count":4,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/3578\/revisions"}],"predecessor-version":[{"id":5807,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/3578\/revisions\/5807"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/media\/3584"}],"wp:attachment":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/media?parent=3578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/categories?post=3578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/tags?post=3578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}