Now you can start to write some simple programs. They show some examples in the manual. You will need to look through the Quick Reference guide here: http://www.cpustick.com/downloads/quickref.v1.80.pdf for all the commands.
Some of the interesting ones are:
help
help pins
And you can set the heartbeat LED (if it is not blinking already) by:
pins heartbeat RA1
(You will have to look on the board to see which port goes to the LED you want to set as heartbeat, RA1 is PORTA.1 and works on my Explorer 16 board).
This prints out an analog result to the terminal:
Code:
10 dim pot as pin an5 for analog input
20 print "potentiometer= ",pot
You would probably be interested in the Servo example on page 30:
Code:
> new
> servo
45
> 10 dim servo as pin dtin1 for servo output
> 20 for servo = 50 to 250 step 10
> 30 sleep 50 ms
> 40 next
> run
Note that you will have to change the servo out pin to one your hardware has. To see the available ones, use the "help pins" command. It will show you at the bottom which pins are available for the servo command. In my case, I changed dtin1 to rd1.
Bookmarks