New library Tinker-Servo

Hello,

I have a new library submitted for public use, It’s called Tinker-Servo and contains the normal tinker library calls plus four new ones:

  • /servoOpen
  • /servoClose
  • /servoSet
  • /servoRead

You are allowed up to eight servos open at any one time.

Functions overview:

/servoOpen - Takes a gpio pin i.e. D1. Returns a index to the server used. This index will be passed to the remaining functions to perform operation on the servo.
/servoClose - Takes a servo index returned by servoOpen. Calls servo.detach() for the pin assigned.
/servoSet - Takes a servo index and a angle (0-179).
/servoRead - Takes a servo index and returns the last value sent to the servo.

I am working on a browser based servo tester/driver now and will have it in the github project once completed.

The library lives at: https://github.com/jscottb/Tinker-Servo

So if i attach this library at the top, will i be able to call the methods and use them from my code?

That’s how libraries are meant to be used :wink:

So I’m trying to have a input signal go into my photon, read it, then if it is high i want to turn one of the output signals off. Your library helps assign the pins but I’m not sure where i would code this at in the tinker file.

What is a “tinker file”?