Outputting to mOLED-128 LCD
geometrix
Posts: 27
All,
I have downloaded some example code for the mOLED-128 LCD. I am reading some input from the GPS module and I want to output this to the mOLED-128.
I have been experimenting with outputting the value of a variable and I cannot seem to figure out how to do this. Do I need to convert the value stored in the variable to a string and then output the string to the OLED-128? Do I need to write an ITOS subroutine to do this?
Thanks in advance.
--Neal
I have downloaded some example code for the mOLED-128 LCD. I am reading some input from the GPS module and I want to output this to the mOLED-128.
I have been experimenting with outputting the value of a variable and I cannot seem to figure out how to do this. Do I need to convert the value stored in the variable to a string and then output the string to the OLED-128? Do I need to write an ITOS subroutine to do this?
Thanks in advance.
--Neal
Comments
Thanks for the reply. I have been sidetracked for the last month and am finally getting back to this.
I have wired the RX and TX pins of the microOLED-128-G1 to P10 and P11 on the Board of Education respectively. I did this per page 8 of the 4D systems microOLED-128-G1 USERS MANUAL. I also connected the the 5V and GND as well (to the 5V and GND pins on the BOE).
I am using code to output characters as shown below, but how do I output the value of X if let's say X=27.58??? I found these code examples on the forum and they seem to work very well with the display. So I have the display working just fine. I am just trying to output values of variables to the display rather than a string character-by-character. This brings me to my next question. Do I need to convert numbers to strings and then output the values of the strings character-by-character?
SEROUT TxPin, Baud, ["s", 0, 4, 0, yel1, yel2, " ! @ # $ % ^ & * ( ) _ + - = 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z { } [ ] | \ ; : ' < > ? , . /", 0]
GOSUB GetACK
PAUSE 3000
SEROUT TxPin, Baud, [$45] ' Clear Screen
GOSUB GetACK
Thanks,
Neal