#31 PICマイコン
Tibbitの配置
Tibbit #31を挿入します。
ノードの配置
制御のために、functionノードを使用します。
Reset
PICマイコンのリセットをします。
以下のようにフローを配置します。
functionノードの編集を開き、コードに以下を記述します。
1 2 3 4 |
msg.payload = [ {act: 'rst'} ]; return msg; |
ノードの設定を開き、スロットを選択します。
Node-REDデプロイ後、injectノードをクリックするとリセットを行うことができます。
サンプルフロー
1 |
[{"id":"b5f7a32c.a6466","type":"Tibbit-#31","z":"b5812d0f.758f","name":"","tpSlot":"S01","communication":"I2C","i2cBaudRateK":"150","connectedStatus":"start","host":"","moreDefaults":[{"outputOnly":{"value":false},"communication":{"value":"GPIO"},"pinA":{"value":"other"},"pinB":{"value":"other"},"pinC":{"value":"OUT_OD"},"pinD":{"value":"IN"}}],"x":500,"y":480,"wires":[[]]},{"id":"35d24088.8d479","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":260,"y":440,"wires":[["96301ce.744656"]]},{"id":"96301ce.744656","type":"function","z":"b5812d0f.758f","name":"reset","func":"msg.payload = [\n {act: 'rst'}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":440,"wires":[["b5f7a32c.a6466"]]}] |
Write
PICマイコンのレジスタに書き込みます。
以下のようにフローを配置します。
functionノードの編集を開き、コードに以下を記述します。
・add: address
・v: value
1 2 3 4 |
msg.payload = [ {act: 'w', add: 0x011D, v: [0x20, 0x00]} ]; return msg; |
複数同時に設定することもできます。(resetやreadなど)
1 2 3 4 5 6 |
msg.payload = [ {act: 'w', add: 0x011D, v: [0x20, 0x00]}, {act: 'w', add: 0x029E, v: [0x24]}, {act: 'r', add: 0x010C, len: 3}, ]; return msg; |
ノードの設定を開き、スロットを選択します。
Node-REDデプロイ後、injectノードをクリックすると書き込みを行うことができます。
サンプルフロー
1 |
[{"id":"b5f7a32c.a6466","type":"Tibbit-#31","z":"b5812d0f.758f","name":"","tpSlot":"S01","communication":"I2C","i2cBaudRateK":"150","connectedStatus":"start","host":"","moreDefaults":[{"outputOnly":{"value":false},"communication":{"value":"GPIO"},"pinA":{"value":"other"},"pinB":{"value":"other"},"pinC":{"value":"OUT_OD"},"pinD":{"value":"IN"}}],"x":500,"y":480,"wires":[[]]},{"id":"35d24088.8d479","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":260,"y":440,"wires":[["96301ce.744656"]]},{"id":"96301ce.744656","type":"function","z":"b5812d0f.758f","name":"write","func":"msg.payload = [\n {act: 'w', add: 0x011D, v: [0x20, 0x00]}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":440,"wires":[["b5f7a32c.a6466"]]}] |
Read
PICマイコンのレジスタから読み込みます。
以下のようにフローを配置します。
functionノードの編集を開き、コードに以下を記述します。
・add: address
・len: size
1 2 3 4 |
msg.payload = [ {act: 'r', add: 0x010C, len: 3} ]; return msg; |
複数同時に設定することもできます。(resetやwriteなど)
1 2 3 4 5 6 |
msg.payload = [ {act: 'w', add: 0x011D, v: [0x20, 0x00]}, {act: 'w', add: 0x029E, v: [0x24]}, {act: 'r', add: 0x010C, len: 3}, ]; return msg; |
ノードの設定を開き、スロットを選択します。
Node-REDデプロイ後、injectノードをクリックすると読み込みを行うことができます。
以下のようなデータがOutputsされます。
1 |
{"int":[],"r":[[32,0,0]]} |
今回はreadですので、キーがrの値が読み込んだ値になります。
サンプルフロー
1 |
[{"id":"b5f7a32c.a6466","type":"Tibbit-#31","z":"b5812d0f.758f","name":"","tpSlot":"S01","communication":"I2C","i2cBaudRateK":"150","connectedStatus":"start","host":"","moreDefaults":[{"outputOnly":{"value":false},"communication":{"value":"GPIO"},"pinA":{"value":"other"},"pinB":{"value":"other"},"pinC":{"value":"OUT_OD"},"pinD":{"value":"IN"}}],"x":420,"y":460,"wires":[["1145d946.52123f"]]},{"id":"35d24088.8d479","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":180,"y":420,"wires":[["96301ce.744656"]]},{"id":"96301ce.744656","type":"function","z":"b5812d0f.758f","name":"read","func":"msg.payload = [\n {act: 'r', add: 0x010C, len: 3}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":420,"wires":[["b5f7a32c.a6466"]]},{"id":"1145d946.52123f","type":"debug","z":"b5812d0f.758f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":590,"y":480,"wires":[]}] |
INT
このTibbitブロックのLINE DのINTの値を取得します。
以下のようにフローを配置します。
functionノードの編集を開き、コードに以下を記述します。
1 2 3 4 |
msg.payload = [ {act: 'int'} ]; return msg; |
ノードの設定を開き、スロットを選択します。
Node-REDデプロイ後、injectノードをクリックすると読み込みを行うことができます。
以下のようなデータがOutputsされます。
1 |
{"r":[],"int":[1]} |
今回はINTですので、キーがintの値が読み込んだ値になります。
サンプルフロー
1 |
[{"id":"b5f7a32c.a6466","type":"Tibbit-#31","z":"b5812d0f.758f","name":"","tpSlot":"S01","communication":"I2C","i2cBaudRateK":"150","connectedStatus":"start","host":"","moreDefaults":[{"outputOnly":{"value":false},"communication":{"value":"GPIO"},"pinA":{"value":"other"},"pinB":{"value":"other"},"pinC":{"value":"OUT_OD"},"pinD":{"value":"IN"}}],"x":400,"y":460,"wires":[["1145d946.52123f"]]},{"id":"35d24088.8d479","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":180,"y":420,"wires":[["96301ce.744656"]]},{"id":"96301ce.744656","type":"function","z":"b5812d0f.758f","name":"INT","func":"msg.payload = [\n {act: 'int'}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":420,"wires":[["b5f7a32c.a6466"]]},{"id":"1145d946.52123f","type":"debug","z":"b5812d0f.758f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":570,"y":460,"wires":[]}] |
INTのEdgeを拾う場合は、以下のノードでフローを配置します。
値が変わるとHIGH(1)/LOW(0)が出力されます。
サンプルフロー
1 |
[{"id":"1145d946.52123f","type":"debug","z":"b5812d0f.758f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":570,"y":460,"wires":[]},{"id":"f17e77b5.2115e","type":"Tibbit-#31 in","z":"b5812d0f.758f","name":"","tpSlot":"S01","outputOnly":true,"communication":"GPIO","pinA":"other","pinB":"other","pinC":"other","pinD":"IN_Edge","connectedStatus":"start","host":"","x":380,"y":420,"wires":[["1145d946.52123f"]]}] |
PWMとして使用する
PICマイコンに読み書きを行い、PWMとして使用する例です。
ノードの配置
PWMにするフロー
このフローを一度実行すると、このTibbitをPWMとして使用することができます。
リセットを行い、レジスタへの読み書きをしています。
サンプルフロー
1 |
[{"id":"461f687e.fae718","type":"inject","z":"de1ce01d.6122a","name":"PWM","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":250,"y":1560,"wires":[["d3e6c495.4539"]]},{"id":"d3e6c495.4539","type":"function","z":"de1ce01d.6122a","name":"cnt = 0","func":"msg.cnt = 0;\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":1560,"wires":[["ca90d693.0190c8"]]},{"id":"ca90d693.0190c8","type":"function","z":"de1ce01d.6122a","name":"reset","func":"msg.payload = [\n {act: 'rst'}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":1560,"wires":[["5e96fdc2.f6cc04"]]},{"id":"1dea98fd.be46e7","type":"function","z":"de1ce01d.6122a","name":"cnt++","func":"msg.cnt = msg.cnt + 1;\n\nmsg.lastActionTime = new Date();\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":1620,"wires":[["ce4fd6c6.a4e6e"]]},{"id":"ce4fd6c6.a4e6e","type":"switch","z":"de1ce01d.6122a","name":"","property":"cnt","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"},{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"9","vt":"str"}],"checkall":"true","repair":false,"outputs":9,"x":710,"y":1740,"wires":[["9790cd3a.39f7"],["3ab90e98.676662"],["9572a13f.6bccb8"],["b3a5b049.10398"],["eab31640.09afe8"],["21b2352d.a3dc7a"],["2d5939b9.5a152e"],["b3dd7020.ff08d8"],["e345fca9.10463"]]},{"id":"2fcbaff0.9a2fe8","type":"function","z":"de1ce01d.6122a","name":"init1","func":"msg.payload = [\n {act: 'w', add: 0x011D, v: [0x20, 0x00]},\n {act: 'w', add: 0x029E, v: [0x24]},\n {act: 'r', add: 0x010C, len: 3},\n ];\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":1700,"wires":[["5e96fdc2.f6cc04"]]},{"id":"bf6d352e.9cf748","type":"link in","z":"de1ce01d.6122a","name":"init1","links":["9790cd3a.39f7"],"x":195,"y":1620,"wires":[["41b5d2bd.8c1e44"]]},{"id":"9790cd3a.39f7","type":"link out","z":"de1ce01d.6122a","name":"","links":["bf6d352e.9cf748"],"x":815,"y":1580,"wires":[]},{"id":"6cfde053.98bdb","type":"function","z":"de1ce01d.6122a","name":"init2","func":"var tmp = msg.payload.r[0];\ntmp[0] |= 0x03; // LATA\ntmp[2] |= 0x03; // LATC\nmsg.payload = [\n {act: 'w', add: 0x010C, v: tmp},\n {act: 'r', add: 0x008C, len: 3},\n ];\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":1740,"wires":[["5e96fdc2.f6cc04"]]},{"id":"3ab90e98.676662","type":"link out","z":"de1ce01d.6122a","name":"","links":["a56b973c.49acb"],"x":815,"y":1620,"wires":[]},{"id":"a56b973c.49acb","type":"link in","z":"de1ce01d.6122a","name":"init2","links":["3ab90e98.676662"],"x":195,"y":1740,"wires":[["6cfde053.98bdb"]]},{"id":"9572a13f.6bccb8","type":"link out","z":"de1ce01d.6122a","name":"","links":["8ff034db.5588e"],"x":815,"y":1660,"wires":[]},{"id":"8ff034db.5588e","type":"link in","z":"de1ce01d.6122a","name":"init3","links":["9572a13f.6bccb8"],"x":195,"y":1780,"wires":[["9b5113f2.c7b588"]]},{"id":"9b5113f2.c7b588","type":"function","z":"de1ce01d.6122a","name":"init3","func":"var tmp = msg.payload.r[0];\ntmp[0] |= 0x03; // TRISA\ntmp[2] |= 0x03; // TRISC\nmsg.payload = [\n {act: 'w', add: 0x008C, v: tmp}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":1780,"wires":[["5e96fdc2.f6cc04"]]},{"id":"56bf8869.a7b308","type":"function","z":"de1ce01d.6122a","name":"io1-1","func":"msg.payload = [\n {act: 'r', add: 0x008C, len: 3},\n {act: 'r', add: 0x018C, len: 3}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":1700,"wires":[["5e96fdc2.f6cc04"]]},{"id":"b3a5b049.10398","type":"link out","z":"de1ce01d.6122a","name":"","links":["afb34ad6.cc0ac8"],"x":815,"y":1700,"wires":[]},{"id":"afb34ad6.cc0ac8","type":"link in","z":"de1ce01d.6122a","name":"io1-1","links":["b3a5b049.10398"],"x":435,"y":1700,"wires":[["56bf8869.a7b308"]]},{"id":"96283c6a.18cf9","type":"function","z":"de1ce01d.6122a","name":"io1-2","func":"var tris = msg.payload.r[0];\nvar ansel = msg.payload.r[1];\ntris[0] |= 0x10 // RA4 入力へ\ntris[2] &= 0xDF // RC5 出力へ\nansel[0] &= 0xEF // RA4 デジタル\nansel[2] &= 0xDF // RC5 デジタル\nmsg.payload = [\n {act: 'w', add: 0x008C, v: tris},\n {act: 'w', add: 0x018C, v: ansel}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":1740,"wires":[["5e96fdc2.f6cc04"]]},{"id":"8ccd5245.774ae8","type":"link in","z":"de1ce01d.6122a","name":"io1-2","links":["eab31640.09afe8"],"x":435,"y":1740,"wires":[["96283c6a.18cf9"]]},{"id":"eab31640.09afe8","type":"link out","z":"de1ce01d.6122a","name":"","links":["8ccd5245.774ae8"],"x":815,"y":1740,"wires":[]},{"id":"7cec0d3f.e2b524","type":"function","z":"de1ce01d.6122a","name":"io2-1","func":"msg.payload = [\n {act: 'r', add: 0x008C, len: 3},\n {act: 'r', add: 0x018C, len: 3}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":1780,"wires":[["5e96fdc2.f6cc04"]]},{"id":"7276768e.b3a138","type":"link in","z":"de1ce01d.6122a","name":"io2-1","links":["21b2352d.a3dc7a"],"x":435,"y":1780,"wires":[["7cec0d3f.e2b524"]]},{"id":"5824cc19.09a27c","type":"function","z":"de1ce01d.6122a","name":"io2-2","func":"var tris = msg.payload.r[0];\nvar ansel = msg.payload.r[1];\ntris[2] |= 0x10 // RC4入力へ\ntris[2] &= 0xF7 // RC3 出力へ\nansel[2] &= 0xE7 // RC3,4 デジタル\nmsg.payload = [\n {act: 'w', add: 0x008C, v: tris},\n {act: 'w', add: 0x018C, v: ansel}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":1820,"wires":[["5e96fdc2.f6cc04"]]},{"id":"2cb1cae3.959e56","type":"link in","z":"de1ce01d.6122a","name":"io2-2","links":["2d5939b9.5a152e"],"x":435,"y":1820,"wires":[["5824cc19.09a27c"]]},{"id":"2f86872f.406648","type":"function","z":"de1ce01d.6122a","name":"io3-1","func":"msg.payload = [\n {act: 'r', add: 0x008C, len: 3},\n {act: 'r', add: 0x018C, len: 3}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":1860,"wires":[["5e96fdc2.f6cc04"]]},{"id":"73d6e739.c2e2","type":"link in","z":"de1ce01d.6122a","name":"io3-1","links":["b3dd7020.ff08d8"],"x":435,"y":1860,"wires":[["2f86872f.406648"]]},{"id":"8d7a6010.02abd8","type":"function","z":"de1ce01d.6122a","name":"io3-2","func":"var tris = msg.payload.r[0];\nvar ansel = msg.payload.r[1];\ntris[0] &= 0xFB // RA2 出力へ\nansel[0] &= 0xFB // RA2 デジタル\nmsg.payload = [\n {act: 'w', add: 0x008C, v: tris},\n {act: 'w', add: 0x018C, v: ansel}\n ];\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":1900,"wires":[["5e96fdc2.f6cc04"]]},{"id":"b5f7447a.6825e8","type":"link in","z":"de1ce01d.6122a","name":"io3-2","links":["e345fca9.10463"],"x":435,"y":1900,"wires":[["8d7a6010.02abd8"]]},{"id":"21b2352d.a3dc7a","type":"link out","z":"de1ce01d.6122a","name":"","links":["7276768e.b3a138"],"x":815,"y":1780,"wires":[]},{"id":"2d5939b9.5a152e","type":"link out","z":"de1ce01d.6122a","name":"","links":["2cb1cae3.959e56"],"x":815,"y":1820,"wires":[]},{"id":"b3dd7020.ff08d8","type":"link out","z":"de1ce01d.6122a","name":"","links":["73d6e739.c2e2"],"x":815,"y":1860,"wires":[]},{"id":"e345fca9.10463","type":"link out","z":"de1ce01d.6122a","name":"","links":["b5f7447a.6825e8"],"x":815,"y":1900,"wires":[]},{"id":"5e96fdc2.f6cc04","type":"Tibbit-#31","z":"de1ce01d.6122a","name":"","tpSlot":"S09","communication":"I2C","i2cBaudRateK":"150","connectedStatus":"start","host":"","moreDefaults":[{"outputOnly":{"value":false},"communication":{"value":"GPIO"},"pinA":{"value":"other"},"pinB":{"value":"other"},"pinC":{"value":"OUT_OD"},"pinD":{"value":"IN"}}],"x":500,"y":1620,"wires":[["1dea98fd.be46e7"]]},{"id":"41b5d2bd.8c1e44","type":"delay","z":"de1ce01d.6122a","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":270,"y":1660,"wires":[["2fcbaff0.9a2fe8"]]}] |
PWMとして使用するフロー
先程のPWMにするフローを実行したあとは、以下のように使用することができます。
各IOに対して周期などを指定している例です。
サンプルフロー
1 |
[{"id":"8038332f.12d458","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":180,"y":1020,"wires":[["ee14f3f9.fc584"]]},{"id":"f628c2ba.a3dc5","type":"function","z":"b5812d0f.758f","name":"パルス幅変調セット","func":"// io\nvar io = msg.io;\n// 1周期長さ[us] 0.1(0.125)~2048\nvar period = msg.period;\n// パルス幅 [us] 0~0.3125~period\nvar pulse_width = msg.pulse_width;\n\n// PWM計算\nvar txcon = 0;\nvar txcon_val = 0;\nvar prx = 0;\n\nif (period < 32.0) {\n txcon = 0;\n txcon_val = 1;\n prx = round(period / 0.125);\n} else if (period < 128.0) {\n txcon = 1\n txcon_val = 4\n prx = round(period / 0.5)\n} else if (period < 512.0) {\n txcon = 2\n txcon_val = 16\n prx = round(period / 2.0)\n} else if (period <= 2048.0) {\n txcon = 3\n txcon_val = 64\n prx = Math.round(period / 8.0)\n} else {\n node.warn('period error!');\n return;\n}\nif (prx !== 0) {\n prx = prx - 1;\n}\n\nif (pulse_width < 0 || pulse_width > period) {\n node.warn('pulse_width error!');\n return;\n}\n\nvar ccp10bit = Math.round(pulse_width * 32 / txcon_val);\nvar ccpcon54 = (ccp10bit & 0x0003) << 4;\nvar ccprxl = ccp10bit >> 2;\n\nif (io === 1) {\n msg.payload = [\n {act: 'w', add: 0x001B, v: [prx]},\n {act: 'w', add: 0x001C, v: [0x04 | txcon]},\n {act: 'w', add: 0x0291, v: [ccprxl]},\n {act: 'w', add: 0x0293, v: [0x0C | ccpcon54]}\n ];\n} else if (io === 2) {\n msg.payload = [\n {act: 'w', add: 0x0416, v: [prx]},\n {act: 'w', add: 0x0417, v: [0x04 | txcon]},\n {act: 'w', add: 0x0298, v: [ccprxl]},\n {act: 'w', add: 0x029A, v: [0x0C | ccpcon54]}\n ];\n} else if (io === 3) {\n msg.payload = [\n {act: 'w', add: 0x041D, v: [prx]},\n {act: 'w', add: 0x041E, v: [0x04 | txcon]},\n {act: 'w', add: 0x0311, v: [ccprxl]},\n {act: 'w', add: 0x0313, v: [0x0C | ccpcon54]}\n ];\n}\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":1020,"wires":[["3d2907cd.e8bc9"]]},{"id":"ee14f3f9.fc584","type":"function","z":"b5812d0f.758f","name":"変数;io1(2000:500)","func":"msg.io = 1;\nmsg.period = 2000;\nmsg.pulse_width = 500;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1020,"wires":[["f628c2ba.a3dc5"]]},{"id":"db8dc0f0.48af4","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":180,"y":1060,"wires":[["e7f9b619.989818"]]},{"id":"e7f9b619.989818","type":"function","z":"b5812d0f.758f","name":"変数;io1(1000:200)","func":"msg.io = 1;\nmsg.period = 1000;\nmsg.pulse_width = 200;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1060,"wires":[["f628c2ba.a3dc5"]]},{"id":"a4f259b5.e91ad","type":"function","z":"b5812d0f.758f","name":"変数;io2(2000:500)","func":"msg.io = 2;\nmsg.period = 2000;\nmsg.pulse_width = 500;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1100,"wires":[["f628c2ba.a3dc5"]]},{"id":"c8d6e373.3eb6c8","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":180,"y":1140,"wires":[["d79c50c4.929d1"]]},{"id":"d79c50c4.929d1","type":"function","z":"b5812d0f.758f","name":"変数;io2(1000:200)","func":"msg.io = 2;\nmsg.period = 1000;\nmsg.pulse_width = 200;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1140,"wires":[["f628c2ba.a3dc5"]]},{"id":"c48b59ce.f1ba5","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":180,"y":1100,"wires":[["a4f259b5.e91ad"]]},{"id":"43ad64a4.24380c","type":"function","z":"b5812d0f.758f","name":"変数;io3(2000:500)","func":"msg.io = 3;\nmsg.period = 2000;\nmsg.pulse_width = 500;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1180,"wires":[["f628c2ba.a3dc5"]]},{"id":"5cf11fa4.af2be8","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":180,"y":1220,"wires":[["85f4eadc.05de3"]]},{"id":"85f4eadc.05de3","type":"function","z":"b5812d0f.758f","name":"変数;io3(1000:200)","func":"msg.io = 3;\nmsg.period = 1000;\nmsg.pulse_width = 200;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1220,"wires":[["f628c2ba.a3dc5"]]},{"id":"556f112e.07436","type":"inject","z":"b5812d0f.758f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"1","x":180,"y":1180,"wires":[["43ad64a4.24380c"]]},{"id":"3d2907cd.e8bc9","type":"Tibbit-#31","z":"b5812d0f.758f","name":"","tpSlot":"S01","communication":"I2C","i2cBaudRateK":"150","connectedStatus":"start","host":"","moreDefaults":[{"outputOnly":{"value":false},"communication":{"value":"GPIO"},"pinA":{"value":"other"},"pinB":{"value":"other"},"pinC":{"value":"OUT_OD"},"pinD":{"value":"IN"}}],"x":620,"y":1080,"wires":[[]]}] |