เราสามารถขยายเพิ่มขา PWM ของ UNO R3 ได้ไหมครับ
เดิมมี 6 มันมี Shield หรือ IC ที่เพิ่ม PWM เข้าไปอีก
หรือต้อง Arduino MEGA 2560 R3 เท่านั้นครับ
ถ้าเป็นแบบ shield ใช้ตัวนี้ครับ ขยายได้ 16 ขาแบบ PWM http://www.arduinoall.com/search?q=TLC5940
ถ้าแบบคุ้มที่สุด ใช้ ic 74hc595 ขยายได้ 8 ขา มีคนทำ software pwm ให้ทำงานแบบ pwm ได้ด้วย ลองหาข้อมูลดู https://www.youtube.com/watch?v=FohODewKyec
หรือลองดู Atmega32A จะมีขามากกว่าครับ
เจอและ ใช่อันนี้ไหมครับ
channel: The channel that should be updated with the new values (0..15)ฃ
on: The tick (between 0..4095) when the signal should transition from low to high
off:the tick (between 0..4095) when the signal should transition from high to low
Ex: "pwm.setPWM(15,1024,3072)"