servo_kit:在Elixir中使用PCA9685 PWMServo控制器 源码
伺服套件 使用Elixir驱动PCA9685 PWM /伺服控制器 安装 您可以通过在您的mix.exs依赖项列表中添加servo_kit来安装该库: def deps do [ { :servo_kit , " ~> 0.1.0 " } ] end 例子 调光LED # Initialize a driver. driver = ServoKit . PCA9685 . new (%{ i2c_bus: " i2c-1 " , frequency: 50 }) # Set the duty cycle to 66.6% for Channel 15. ServoKit . PCA9685 . set_pwm_duty_cycle (driver, 15 , 66.6 ) 控制标准伺服 # Initialize a standard servo controller.
下载地址
用户评论