I need to translate the following code Picaxe to Arduino to do a library on GLCD 192x64 KS0108B and I2C controller Bv4613 of Byvac.
The code is this:
pause 1000
Main:
Hi2csetup i2cmaster,0x64,i2cslow,i2cbyte
pause 1000
HI2cOut ("Before CLS")
pause 1000
'Clear screen
HI2cOut ($1b) ; esc
HI2cOut ($5b) ; [
HI2cOut ($32) ; 2
HI2cOut ($4a) ; J
Pause 1000
HI2cOut ($1b,$5b,$3f,$32,$35,$49) 'Hide cursor
pause 20
HI2cOut ("After CLS")
pause 1000
'Move cursor
'HI2cOut ($1b,$5b,$32,$3b,$31,$35,$48) can use hex or ascii code
HI2cOut ( 27 ,91 ,50 ,59 ,49, 53,72)
pause 1000
HI2cOut ("After move 2-15")
pause 1000
HI2cOut (CR)
pause 1000
b1=$2a
HI2cOut ("b1 is an asterisk ",b1) ;Write value of variable b1
pause 1000
'Draw rectangle
'Coords (esc { 3 2 , 3 6 , 1 1 1 , 4 5 R)
'HI2cOut ($1b,$7b,$33,$32,$2c,$33,$36,$2c,$31,$31,$31,$2c,$34,$35,$46)
HI2cOut ( 27,123, 51, 50, 44, 51, 54, 44, 49, 49, 49, 44, 52, 53, 82)
Pause 1000
'Draw filled rectangle
HI2cOut ( 27,123, 51, 53, 44, 51, 57, 44, 49, 48, 56, 44, 52, 51, 70)
pause 1000
HI2cOut (CR)
pause 20
HI2cOut ($1b,$5b,$49) 'invert colours
pause 20
HI2cOut (" thats all folks!! ")
Pause 20
HI2cOut ($1b,$5b,$49) 'un-invert colours
pause 20