Picaxe AXE133Y Serial OLED with PICAXEAXE002 STARTER PACK

bassbig

New Member
HI

I am new to electronics but have managed to get the hardware working

What I have not been able to achieve is to write a programme to scroll a long message .

Has anyone got a programme they can let me copy and then change the message

hopefull

John
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE Forum.

The easiest way to scroll a message is to simply rewrite it on screen starting one character further on each time. One example -

Code:
Do
  SerOut LCD, N2400, (254,$80)
  For b1 = 0 To 15
    b2 = b0 + b1 // 22 ; 22 is the length of message below
    ;            123456789-123456789-12
    LookUp b2, ("This is a long line - "),b3
    SerOut LCD, N2400, (b3)
  Next
  Pause 500
  b0 = b0 + 1
Loop
 

bassbig

New Member
axe133y

Welcome to the PICAXE Forum.

The easiest way to scroll a message is to simply rewrite it on screen starting one character further on each time. One example -

Code:
Do
  SerOut LCD, N2400, (254,$80)
  For b1 = 0 To 15
    b2 = b0 + b1 // 22 ; 22 is the length of message below
    ;            123456789-123456789-12
    LookUp b2, ("This is a long line - "),b3
    SerOut LCD, N2400, (b3)
  Next
  Pause 500
  b0 = b0 + 1
Loop
Thanks for your reply
When I run yourprogramme I get a error message

SerOut LCD, N2400, (254,$80)
^
Syntax error on line 2 at/before position 9
 

hippy

Ex-Staff (retired)
You need to add a SYMBOL definition for the LCD pin which indicates which PICAXE pin drives the AXE133Y. For example if your AXE133Y is connected to pin B.7 -

Code:
Symbol LCD = B.7
And the full code, including a pause to ensure the AXE133Y has initialised, would become -

Code:
Symbol LCD = B.7

Pause 2000

Do
  SerOut LCD, N2400, (254,$80)
  For b1 = 0 To 15
    b2 = b0 + b1 // 22 ; 22 is the length of message below
    ;            123456789-123456789-12
    LookUp b2, ("This is a long line - "),b3
    SerOut LCD, N2400, (b3)
  Next
  Pause 500
  b0 = b0 + 1
Loop
 
Top