servo_kit:在Elixir中使用PCA9685 PWMServo控制器

时间:2021-03-19 09:49:30
【文件属性】:
文件名称:servo_kit:在Elixir中使用PCA9685 PWMServo控制器
文件大小:24KB
文件格式:ZIP
更新时间:2021-03-19 09:49:30
elixir nerves pca9685 pwm servo-controller 伺服套件 使用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.
【文件预览】:
servo_kit-main
----mix.lock(4KB)
----.gitignore(618B)
----mix.exs(2KB)
----.formatter.exs(117B)
----LICENSE(1KB)
----.github()
--------workflows()
----README.md(2KB)
----config()
--------test.exs(208B)
--------config.exs(48B)
--------dev.exs(14B)
----lib()
--------servo_kit()
--------servo_kit.ex(4KB)
----test()
--------support()
--------test_helper.exs(15B)
--------servo_kit()
--------servo_kit_test.exs(48B)

网友评论