Servo in Forever Block Stops

Microsoft's MakeCode platform for easy blocks-style programming

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Doryen
 
Posts: 35
Joined: Thu Aug 07, 2014 7:54 pm

Servo in Forever Block Stops

Post by Doryen »

I have a SG-5010 Standard Servo connected to a Crickit and a Circuit Playground.

Referencing the code below, the Servo loops about 1-2 times and stops, but the photon's keep going and don't dim.

I put the SG92R micro server on in place of the GS-5010 and all is fine. I'm running on batteries and the voltage reads about 4.2V.

Since the min voltage of the SG-5010 specs is 4.8V, would this be classified as a power issue?

Code: Select all

forever(function () {
    light.setPhotonPenHue(88)
    light.photonForward(1)
    crickit.servo1.setPulse(20)
    pause(__internal.__timePicker(2000))
    light.photonForward(1)
    crickit.servo1.setPulse(1500)
    pause(__internal.__timePicker(2000))
    light.photonForward(1)
    crickit.servo1.setPulse(2300)
    pause(__internal.__timePicker(2000))
})

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: Servo in Forever Block Stops

Post by johnpark »

Hi, I think your diagnosis is a good one. I was able to run your code with the full size servo using fresh batteries with no problems. Same for using a 5V 2A wall power supply. Try using some fresh, high-quality alkaline batteries and see if it works again as expected.

User avatar
Doryen
 
Posts: 35
Joined: Thu Aug 07, 2014 7:54 pm

Re: Servo in Forever Block Stops

Post by Doryen »

Thanks so much John! I'm going to go with the AC Adapter route, as we will be using 4 servos soon!

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: Servo in Forever Block Stops

Post by johnpark »

Right on! Have fun.

Locked
Please be positive and constructive with your questions and comments.

Return to “MakeCode”