pin3 as output fails to download

Dr_John

Member
The following program will not download:
pin0=0
pin1=1
pin2=0
pin3=1
pin4=0
pin5=1
pin6=0
pin7=1

It gives a popup "Error unknown symbol pin3"
Picaxe version = 18x
Programming editor version = 4.1.13

Pin3 as an input should be illegal, but it should be allowed as an output.
 

Technical

Technical Support
Staff member
To switch output pins on and off use high and low commands, not pin =

The pin variables are for input use only.

 

Dr_John

Member
Thanks to you both for speedy replies.

I have retested my code, and the following program downloads and runs as expected:
loop:
pin1=pin7 'read pin 7 (microswitch) and light LED if pressed.
debug pins ' confirm output settings.
goto loop

The debug window shows a pins (out) value of 2 when the microswich is pressed and the LED does light.

Perhaps the documentation of variables could be extended?
 
Top