// 초기설정
sudo gpio mode 21 out
sudo gpio mode 22 out
sudo gpio mode 23 pwm
node.js onoff 에서는 다음과 같이 다른 번호를 사용하게 된다.
const Gpio = require('onoff').Gpio;
var in1 = new Gpio(5, 'out')
var in2 = new Gpio(6, 'out')
var in0 = new Gpio(13, 'out')
in1.writeSync(1)
in2.writeSync(0)
in0.writeSync(1)
$ systemctl status dhcpcd ● dhcpcd.service - dhcpcd on all interfaces Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled) Active: failed (Result: signal) since Wed 2020-05-13 18:23:15 KST; 5min ago Process: 1694 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS) Main PID: 1696 (code=killed, signal=SEGV)
5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: carrier acquired 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: IAID 76:90:50:d5 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: adding address fe80::a73b:b28c:e97:7810 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: using static address 169.254.71.187/24 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: adding route to 169.254.71.0/24 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: carrier lost 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: deleting address fe80::a73b:b28c:e97:7810 5월 13 18:23:15 raspberrypi dhcpcd[1696]: wlan0: deleting route to 169.254.71.0/24 5월 13 18:23:15 raspberrypi systemd[1]: dhcpcd.service: Main process exited, code=killed, status=11/SEGV 5월 13 18:23:15 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'signal'.
$ dmesg [ 542.390642] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 542.423897] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 542.451050] WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on 0 [ 543.220943] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 543.922372] WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on 3