Difference between revisions of "Servo Driver HAT"

From Diustou Wiki
m (Text replacement - "Infobox item" to "Product")
m (Text replacement - "{{SERVERNAME}}/w/upload" to "{{SERVERNAME}}/en/w/upload")
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Line 5: Line 4:
|categories=[[:Category:Modules|Modules]],[[:Category:Raspberry Pi|Raspberry Pi]]
|categories=[[:Category:Modules|Modules]],[[:Category:Raspberry Pi|Raspberry Pi]]
Line 16: Line 14:
*[https://{{SERVERNAME}}/w/upload/1/1b/Servo_Driver_HAT_User_Manual_EN.pdf User Manual]
*[https://{{SERVERNAME}}/en/w/upload/1/1b/Servo_Driver_HAT_User_Manual_EN.pdf User Manual]
*[https://{{SERVERNAME}}/w/upload/a/a2/Servo_Driver_HAT_Schematic_.pdf Schematic]
*[https://{{SERVERNAME}}/en/w/upload/a/a2/Servo_Driver_HAT_Schematic_.pdf Schematic]
*[https://{{SERVERNAME}}/w/upload/6/6c/Servo_Driver_HAT.7z Demo code]
*[https://{{SERVERNAME}}/en/w/upload/6/6c/Servo_Driver_HAT.7z Demo code]

Latest revision as of 09:25, 23 March 2021

Servo Driver HAT

Categories: Modules,Raspberry Pi

Brand: Waveshare





Related products



Servo Driver HAT for Raspberry Pi, 16-Channel, 12-bit, I2C Interface

How to use

Using with Raspberry Pi

To use this mdoule, we provide python exmples for testing the PCA9685 as well as wifi remotel controlling and bluetooth controlling codes

Enable I2C Interface

Open a terminal and run the following commands: sudo raspi-config Choose Interfacing Options -> I2C ->yes RPI open i2c.png Reboot Raspberry Pi: sudo reboot

Install libraries

sudo apt-get updata sudo apt-get install python-pip sudo pip install RPi.GPIO sudo apt-get install python-smbus

Downalod the demo codes and unzip

You should start the Raspberry Pi, open a terminal and run the following commands: sudo apt-get install p7zip-full wget http://www.waveshare.net/w/upload/6/6c/Servo_Driver_HAT.7z 7zr x Servo_Driver_HAT.7z -r -o./Servo_Driver_HAT sudo chmod 777 -R Servo_Driver_HAT cd Servo_Driver_HAT/Raspberry\ Pi/

Run The Examples

Python Examples

Open a terminal and runt the following comamnds:

  1. For python2

cd ~/Servo_Driver_HAT/Raspberry\ Pi/ cd python/ sudo python PCA9685.py

  1. For python3

cd ~/Servo_Driver_HAT/Raspberry\ Pi/ cd python3/ sudo python3 PCA9685.py Expected result:Connect a servo to Channel 0, the servo will rotate.。

WIFI Remote Control

Open a terminal and run the following commands: cd ~/Servo_Driver_HAT/Raspberry\ Pi/ cd Wifi-Control/ sudo python main.py Expected result: Connect the Raspberry Pi and telephone to the same WLAN network. Data will be tranmsitted by TCP protocol. After running, the IP address and the Port are printed in terminal..

Open the APP and choose the WIFI control, input the IP address and the port then connect..

900px It enters the contorl page if connected successfully. You can click button to controtl the four servo (Channel 0 to Channel 4). 900px You can also connect it with QT software in windows PC.= 900px Note: You can downalod the APP and the QT softwre from Resources part.




Icon-mail.png Contact us

Working hours: 09:00-18:00 (UTC+8 Monday to Saturday)