embeded/raspberry pi2015. 9. 16. 10:20

서보 모터 2개 제어하려니.. PWM 채널 2개인게 편해서 검색..

그런데.. 저 핀 수는 어떤 기준이지?


12  PWM channel 0  A+/B+/Pi2 and compute module only

13  PWM channel 1  A+/B+/Pi2 and compute module only

18  PWM channel 0  All models

19  PWM channel 1  A+/B+/Pi2 and compute module only


40  PWM channel 0  Compute module only

41  PWM channel 1  Compute module only

45  PWM channel 1  Compute module only

52  PWM channel 0  Compute module only

53  PWM channel 1  Compute module only


[링크 : http://abyz.co.uk/rpi/pigpio/python.html#hardware_PWM] 


There are two hardware PWM channels on the BCM2385/6.

PWM0, which can be set to use GPIOs 12, 18, 40, and 52. Only 12 (pin 32) and 18 (pin 12) are available on the B+/2B, and PWM1 which can be set to use GPIOs 13, 19, 41, 45 and 53. Only 13 is available on the B+/2B, on pin 35 (but I think PWM1 is used for something - is it the audio output?)


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=105044] 


라즈베리 2B에는 GPIO13과 GPIO18번이 나와있으니.. 이걸 두개 설정해서

HW PWM으로 사용할 수 있을 것 같은데..

[링크 : http://elinux.org/RPi_BCM2835_GPIOs]


[링크 : http://elinux.org/RPi_Low-level_peripherals]




이렇게 맞붙여서 한번 해봐야지..


Posted by 구차니