Digole Display Driver
Michel L
Posts: 141
I'm working on my first driver object that I plan to publish on the OBEX.
First a small question: Does the spin compile remove PUB methods that are not used? I think it does, but I'm not sure.
As I've put in the title, it'll be a driver object for a display from Digole
The display I have: 1.8" Color OLED160x128 (the manual)
I 'm planning to put most of the Arduino methods in my driver.
So far I've just been creating the methods and putting some transmit commands in them. With the strings inline
Is this the best way to go? Or should I put the control characters in the CON or DAT section?
Any help is appreciated. I don't know exactly what the best practices are with the Prop.
Michel
First a small question: Does the spin compile remove PUB methods that are not used? I think it does, but I'm not sure.
As I've put in the title, it'll be a driver object for a display from Digole
The display I have: 1.8" Color OLED160x128 (the manual)
I 'm planning to put most of the Arduino methods in my driver.
So far I've just been creating the methods and putting some transmit commands in them. With the strings inline
OBJ display : "Simple_Serial" PUB init(displayPin): Okay return display.init(-1, displayPin, 9600) PUB initBaud(displayPin, baud): Okay return display.init(-1, displayPin, baud) PUB sendCommand(command) display.str(command) PUB clearScreen sendCommand(string("CL")) PUB enableCursor setCursor(1) PUB setCursor(cursor) sendCommand(string("CS")) display.tx(cursor) PUB disableCursor setCursor(0) PUB printString(text) sendCommand(string("TT")) sendCommand(text)
Is this the best way to go? Or should I put the control characters in the CON or DAT section?
Any help is appreciated. I don't know exactly what the best practices are with the Prop.
Michel
Comments
Did you ever post anything to obex for this display? I can't find any reference to a Digole display driver.
I just bought a 320x240 display that uses the same protocol and I'd rather not spend time (re)creating an object if you already have something that I could use.
Walter