key-arrow ascii


Technical Support
Staff member
There is no direct 'ASCII' value for these keys - they use a double code. See page 75 (keyin) of part 2 of the PICAXE manual.


Up Arrow = E0,75

As the keyin command ignores any leading EO the number returned by the keyin command will be 75.


ok, but this will work when i use a serial command?
so...i must write in this way?

'picaxe 08M

serin 3,N2400,b0
if b0 = $EO,75 then tx
goto loop

for b1=1 to 5
infraout 1,0
pause 45
next b1
goto control


Technical Support
Staff member
Will it work ? That IF statement won't.

The real question is, what are you taking your key press from ? If it's a PC keyboard you'll need to use KEYIN and check the 'keyvalue' returned. If it's some serial based terminal you would use SERIN, and you'll probably have to do some experimenting to find what byte value(s) the terminal sends for the arrow key as I'm not sure there is any standard.

There's no simple answer to your question because it's not clear exactly in what context you mean.