Why isn't there - there.
[code:1:e13c1f559c]
Const Oled_address = &HA2
Const Oled_8x16str = &H10
Dim Oled_txt As String * 16 ' line buffer for text
Dim Oled_txt_byte(16) As Byte At Oled_txt Overlay ' too, but in a byte equivalent (not to convert)
...
Oled_txt = "Hello World!"
Oled_ln = 0 ' line number/position (which displays the text, X (0-7))
Oled_col = Oled_ln ' position of the column (which displays the text, Y (0-127))
Gosub Oled_text
...
Oled_text:
I2cstart #1
I2cwbyte Oled_address , #1
I2cwbyte Oled_8x16str , #1
I2cwbyte Oled_ln , #1 ' Page
I2cwbyte Oled_col , #1 ' Column
For Oled_f = 1 To 16
I2cwbyte Oled_txt_byte(oled_f) , #1
Next Oled_f
I2cstop #1
Return
[/code:1:e13c1f559c]
Some Chinese models, device address are different (Oled_address).
↧