Controlling servo

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
sebaszz
Posts: 8
Joined: 29 Jul 2016 16:22

Re: Controlling servo

Post by sebaszz » 14 Sep 2016 21:44

ok thank you for the feedback. will keep an eye on the updates

AlmostSerious
Posts: 6
Joined: 01 Oct 2016 17:15

Re: Controlling servo

Post by AlmostSerious » 01 Oct 2016 17:23

Hello, I'd also like to control a servo.

I have previously done it via servo.h library on my normal Arduino.

I was using the following code, which is much simpler than what the original poster wants.
However, the library seems not supported. Anyway i can already achieve the below?
(Basically i want the Z-Uno to make a sweep with the Servo, 180° and back when its turned on, and then turn back off to sleep mode)

Code: Select all

#include <Servo.h> 
 
Servo myservo;  // create servo object to control a servo 
                // twelve servo objects can be created on most boards
 
int pos = 0;    // variable to store the servo position 
 
void setup() 
{ 
  myservo.attach(10);  // attaches the servo on pin 10 to the servo object 
 
 
  for(pos = 0; pos <= 0; pos += 7) // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 
  {delay(2000);}
  for(pos = 180; pos>=160; pos-=7)     // goes from 180 degrees to 0 degrees 
  {                                
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 
} 
void loop() 
{}

User avatar
PoltoS
Posts: 5000
Joined: 26 Jan 2011 19:36

Re: Controlling servo

Post by PoltoS » 01 Oct 2016 19:12

We have not yet finished timers support in Z-Uno. They are required for servo. Hope we do it by November.

AlmostSerious
Posts: 6
Joined: 01 Oct 2016 17:15

Re: Controlling servo

Post by AlmostSerious » 02 Jan 2017 18:02

Any update on this? Can i finally start converting my project to ZWave? :)

User avatar
PoltoS
Posts: 5000
Joined: 26 Jan 2011 19:36

Re: Controlling servo

Post by PoltoS » 06 Jan 2017 21:13

Interrupts are our next release. First will be INT1 and INT0 and then GPT + Zerox. GPT is what you want!

User avatar
SparkyRih
Posts: 17
Joined: 21 Dec 2016 21:42

Re: Controlling servo

Post by SparkyRih » 22 Jan 2017 16:02

Any updates to control the servo now? :)

User avatar
PoltoS
Posts: 5000
Joined: 26 Jan 2011 19:36

Re: Controlling servo

Post by PoltoS » 24 Jan 2017 01:06

First interrupts will be released for tests soon. 2.0.8 is on the way. Many-many small fixes!

User avatar
PoltoS
Posts: 5000
Joined: 26 Jan 2011 19:36

Re: Controlling servo

Post by PoltoS » 23 Feb 2017 02:36

Test version with Timers is available. Check viewtopic.php?f=3427&t=24573

Soon we will make an example with servo

p0lyg0n1
Posts: 173
Joined: 04 Aug 2016 07:14

Re: Controlling servo

Post by p0lyg0n1 » 15 Mar 2017 18:45

The simple library for servos now is available in 2.0.9. Try it. https://forum.z-wave.me/viewtopic.php?f=3427&t=24680

intveltr
Posts: 4
Joined: 19 Jun 2017 20:31

Re: Controlling servo

Post by intveltr » 02 Dec 2017 17:58

What is the current status of this Zuno Servo library?

I have tried the example sketch but the servo jitters a lot even when the value isn't changing. I can work around this by switching the servo controller off with servo.end() after it reaches its position. In my application (controlling blinds) this works fine, but in other situations turning off the servo means it will not hold its position is a force is applied to the arm.

Post Reply