hello, i need to change the Code for The Microcontroller

fedex

New Member
hello, i need to change the Code for The Microcontroller. This code will work with both the Basic Stamp, and the PicBasic Compiler, and i need to change to picaxe programming editor, because i want control pc with visual basic pogramm to picaxe18x, i want to move servomototors, the code is :
symbol pos = b2 ' Position storage
symbol servo = b3 ' Corresponds to pins 1-7 for servo number
symbol count = b4 ' Count storage

start:
serin 0,N2400,servo,pos ' Input data on pin 0, 2400 baud

move:
for count = 0 to 40
pulsout servo,pos ' Send servo# ?, to position# ?
pause 20 ' Timing delay
next count ' Do it again until count = 40
goto start ' Return and wait for more input
thanks, thanks, thanks
 

andrewpro

New Member
You can use neither "servo" or "count" for symbol names as these are reserved for commands.

The rest looks ok, though I didn't read it extreemly carefully. Try changing those two things and it may work for you.

--Andy P
 

Mycroft2152

Senior Member
The first step is to actually read the PICAXE Interfacing manual on using servos.It is surprising what a wealth of information is in the manuals.

Familiarizing yourself with PICAXE BASIC commands might be a good idea. Rather than just asking the group to convert this for you.


There is a lot of truth to the old adage about showing a man how to fish....,

Sorry, I'm a little cranky tonight, guys. But lately, there seems to be less individual effort before asking for help. As well as minimal info provided with requests.

Myc
 

manuka

Senior Member
Hear hear! This forum is fast gaining a "Google" reputation = "Ask anything vague & the helpful brains trust will kindly refine your needs". Suggest a standard check list -
* RTFM ?
* Picaxe type?
* Past electronics experience (0-10)
* Past pogramming experience(0-10)
* Where are you ?
* Resources (0-10)
* School projects etc- help allowed?
* URLs for specific items mentioned
* ...



 

flyingnunrt

Senior Member
fedex
Are these RC servos?
What you need to do is put aside ALL of your STAMP stuff.
Download and install the Picaxe Programming Editor and then study up on the servo command in the help manuals.
Equip yourself with PICAXE stuff and in no time flat you should have everthing pretty much under control.
 
Top