Make a directory inside your “tessel-code” folder called “servo”, change directory into that folder, and initialize a tessel project:
mkdir servo; cd servo; t2 init
Plug servo into port “1” on the module as shown.
-
+
S
Plug 5V adapter into the barrel jack on the servo module, then plug into wall power.
Plug the servo module into Tessel port A with the hexagon/icon side down and the electrical components on the top, then plug Tessel into your computer via USB.
Install by typing npm install servo-pca9685
into the command line.
Rename “index.js” to “servo.js” and replace the file’s contents with the following:
Save the file.
In your command line, t2 run servo.js
Watch your servo move!
Bonus: Make the servo turn all the way to position 1 in one fell swoop, and then back to position 0.
To see what else you can do with the servo module, see the module docs here.
What else can you do with a servo module? Try a community-created project.
What are you making? Share your invention!
If you run into any issues you can check out the servo forums.