Picaxe08M2 port pin naming convention


New Member
I am using a Picaxe08M2 to control a bore water pump using Picaxe Programming Editor v. 5.5.5 (just downloaded).
The code fragment is as follows:
#picaxe 08m2

Symbol TimeCounter=b0
Symbol Pump_Pin=C.1
Symbol TankFullInput=3

'Output Pump_Pin
'Input TankFullInput

Main: b0=0 ' Reset timer
TimeLoop: wait 1 ' wait 1 second
b0=b0+1 ' increment timer
if b0=180 then Pumpon ' Hop out if 3 mins is up
goto TimeLoop

Pumpon high Pump_Pin ' Turn on pump
When I do a syntax check, the last line always gives an error, even when I remove the use of the Symbol statement. ie the last statement becomes:
Pumpon high C.1
It doesn't seem to like the naming convention listed in the Picaxe Manual.


Senior Member
The short answer is that the label Pumpon needs a colon
Pumpon:     high Pump_Pin        ' Turn on pump
But you can dispense with the label Pumpon and a line of code:
if b0<180 then TimeLoop ' Hop out if 3 mins is up

high Pump_Pin        ' Turn on pump
And use [] not <> round the code marks.


New Member
Hi Derek. Thank you for the reply. I didn't realise the syntax error had nothing to do with the pin naming convention. You are quite right. Putting the colon in removes the syntax error. I am quite red-faced; you wouldn't think I have written the code for at least 10 successful Picaxe projects. Thanks also for the tip on the brackets as well. I can see what they are for now.