Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Printing & Using The Pwm Value ? ?

Good Morning EZ-Scripters !

Attached is my crude attempt to use and display the PWM Value.

:Start
#
PWM(D19,50)
#
:Loop
#
$x=GetServo(D19)
#
#WaitForChange($x)
#
Print($x)
#
Goto(Loop)
#

PWM(D19,50) initializes to 50%, and the Slide Bar changes its value, but my Print Value does not change ?

Thank You All & Best Wishes,

DougPope@cox.net, 602-246-1246(H)



RoombaSpeedControlUsingEZ-B'sPWM1-Feb-2013.EZB


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
PRO
Synthiam
#1  
When you set port D19 to PWM, it is not a servo, it is PWM.

PWM = Pulse Width Modulation
SERVO = A device used to provide control of a desired operation through the use of feedback

Every control has ? next to the X (close). If you press the ?, you will be directed to a tutorial page for that control. I suggest viewing the PWM control tutorial and watching the video. It explains a little of what PWM is. PWM will not work with the Roomba. The roomba speed is controlled by SetSpeed() and GetSpeed().

The EZ-Script manual is next to the editor.
#2  
Good Morning DJ !

Thank You for both your Tutoring and your Patience with the aged.

Your PWM Video is GREAT !

Cleaver how you used a Single Ribbon Cable from multiple EZ-B Ports to the H-Bridge.

It's now on to GetSpeed() & SetSpeed() !

SetSpeed( speed )
Sets the global Movement Speed value
Example: SetSpeed(50)

GetSpeed( )
Returns the global Movement Speed value
Example: GetSpeed()

Thanks Again,

DougPope@cox.net, 602-246-1246(H)
PRO
Synthiam
#3  
:) Anytime Doug!

It means a lot to me when I see someone find the solution with a little guidance - rather than doing all the work. Kudos!