Dumbo Newbie Code Help

Status
Not open for further replies.

Traveler

New Member

I am constructing this https://www.imagesco.com/articles/picservo/04.html and I just cant seem to get it to compile, I am certainly not a programmer of any sorts I can build valve and transistor projects ( real old school ), I would greatly appreciate one of you experts on this board if possible to compile a hex file of the above link for me please
or give me a step by step instruction on how to get PICBasic pro to compile it without the syntax and expression errors.
Thank you
 
Ok I will post the code here as requested :

' First servomotor program
' Sweeps left to right, then reverses
INCLUDE "bs1defs.bas"
Symbol B1 = pw ' create a variable pw
pw = 100 ' start at extreme left
sweep: pulsout 0,pw ' send pulse to motor
pause 18 ' set frequency to about 50 Hz
pw = pw + 1 ' increase pw by 1
if pw > 200 then back ' at extreme right, turn CCW
goto sweep ' otherwise, continue
back: pulsout 0,pw ' send pulse to motor
pause 18 ' set frequency to about 50 Hz
pw = pw - 1 ' decrease pw by 1
if pw < 100 then sweep ' at extreme left, turn CW
goto back ' otherwise, continue
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…