OLED Scrolling Display

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
User avatar
jsilver
Normal user
Posts: 23
Joined: 24 May 2016, 14:45
Location: Lewes, UK
Contact:

Re: OLED Scrolling Display

#31 Post by jsilver » 13 Jun 2016, 09:09

jsilver wrote:Do you mean you're displaying the values in the original ESPEasy OLED tiny-font multi-line plugin, or this wonderful big-font multi-page scrolling one?
Ok to answer myself, I've now explored further and found I can display variables from onboard sensors or even other ESP8266 units in the framed OLED plugin, which is amazing! But it only works with numbers.

But I was also hoping to send strings via mqtt for the unit to display on its OLED. If I get around to it I might try implementing this myself. It'd be interesting to have a room message board which can display useful room data as well as messages.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: OLED Scrolling Display

#32 Post by tozett » 13 Jun 2016, 20:34

+1
:mrgreen:

QcVictor
Normal user
Posts: 46
Joined: 23 Feb 2016, 00:47

Re: OLED Scrolling Display

#33 Post by QcVictor » 03 Jul 2016, 20:47

I have some trouble to compile
_P103_Event.ino: In function 'void Plugin_103_Action(byte, byte, int, int, byte)':
_P103_Event:522: error: invalid conversion from 'char*' to 'byte {aka unsigned char}' [-fpermissive]
_P103_Event:522: error: too few arguments to function 'void ExecuteCommand(byte, const char*)'
Command.ino:2:6: note: declared here
Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: len=-149
at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:501)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidthUpTo(TokenImpl.java:528)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidth(TokenImpl.java:499)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1142)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1121)
at org.fife.ui.rsyntaxtextarea.SyntaxView.getLineWidth(SyntaxView.java:304)
at org.fife.ui.rsyntaxtextarea.SyntaxView.calculateLongestLine(SyntaxView.java:110)
at org.fife.ui.rsyntaxtextarea.SyntaxView.updateMetrics(SyntaxView.java:892)
at org.fife.ui.rsyntaxtextarea.SyntaxView.setSize(SyntaxView.java:802)
at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1722)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:912)
at javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(BasicTextAreaUI.java:120)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at javax.swing.JTextArea.getPreferredSize(JTextArea.java:619)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:791)
at java.awt.Container.layout(Container.java:1508)
at java.awt.Container.doLayout(Container.java:1497)
at java.awt.Container.validateTree(Container.java:1693)
at java.awt.Container.validate(Container.java:1628)
at javax.swing.RepaintManager$3.run(RepaintManager.java:704)
at javax.swing.RepaintManager$3.run(RepaintManager.java:702)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:701)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1719)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "Thread-29" java.lang.IndexOutOfBoundsException: len=-149
at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:501)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidthUpTo(TokenImpl.java:528)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidth(TokenImpl.java:499)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1142)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1121)
at org.fife.ui.rsyntaxtextarea.SyntaxView.getLineWidth(SyntaxView.java:304)
at org.fife.ui.rsyntaxtextarea.SyntaxView.calculateLongestLine(SyntaxView.java:110)
at org.fife.ui.rsyntaxtextarea.SyntaxView.updateMetrics(SyntaxView.java:892)
at org.fife.ui.rsyntaxtextarea.SyntaxView.setSize(SyntaxView.java:802)
at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1722)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:912)
at javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(BasicTextAreaUI.java:120)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at javax.swing.JTextArea.getPreferredSize(JTextArea.java:619)
at javax.swing.JViewport.getViewSize(JViewport.java:999)
at javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport(BasicScrollPaneUI.java:278)
at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1033)
at javax.swing.JViewport.fireStateChanged(JViewport.java:1369)
at javax.swing.JViewport.setView(JViewport.java:969)
at javax.swing.JScrollPane.setViewportView(JScrollPane.java:1007)
at org.fife.ui.rtextarea.RTextScrollPane.setViewportView(RTextScrollPane.java:253)
at processing.app.Editor.setCode(Editor.java:1766)
at processing.app.Sketch.setCurrentCode(Sketch.java:1000)
at processing.app.Sketch.setCurrentCode(Sketch.java:980)
at processing.app.Editor.statusError(Editor.java:2670)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2396)
at java.lang.Thread.run(Thread.java:745)

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: OLED Scrolling Display

#34 Post by tozett » 04 Jul 2016, 05:27

what is your environment?
arduino ide version, plattform version? ...
maybe check working versions here: http://www.esp8266.nu/forum/viewtopic.php?p=7763#p7763

Shantarius
New user
Posts: 3
Joined: 25 Jul 2016, 12:19

Re: OLED Scrolling Display

#35 Post by Shantarius » 25 Jul 2016, 12:23

Hi,

i have Problems to compile your mod.

Arduino IDE 1.6.9
ESP8266 Library 2.3.0
OLED Library 2.0.0 (Your Library from Github)

Code: Select all

/Users/Chris/Documents/Arduino/Projects/ESPEasy/ESPEasy/_P205_FrameOLED.ino: In function 'boolean Plugin_205(byte, EventStruct*, String&)':
_P205_FrameOLED:386: error: 'string2Integer' was not declared in this scope
         int intPayload=string2Integer(Payload);
                                              ^
_P205_FrameOLED:390: error: 'getValueNameIndex' was not declared in this scope
         int ValueNameIndex=getValueNameIndex(event->TaskIndex,string);
                                                                     ^
_P205_FrameOLED:430: error: 'CheckParam' was not declared in this scope
           if (! CheckParam("Line Number",Line,1,8)) {
                                                  ^
exit status 1
'string2Integer' was not declared in this scope

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: OLED Scrolling Display

#36 Post by namirda » 05 Aug 2016, 06:41

Hi,

There an update to OLED Scrolling Display plugin in the Playground which should hopefully play nicely with ESPEasy 114+, Core 2.3 - it still needs the same OLED library from the Playground as before.

There is one new input parameter which allows you to change the scroll speed - from very slow (about 1.5s) to almost instant. The scrolling routine blocks the main Arduino loop and it could be that sometimes the longer slower scrolls will cause some timing problems - this issue can be reduced by using faster scrolls.

N

User avatar
jsilver
Normal user
Posts: 23
Joined: 24 May 2016, 14:45
Location: Lewes, UK
Contact:

Re: OLED Scrolling Display

#37 Post by jsilver » 08 Aug 2016, 14:04

namirda wrote:There an update to OLED Scrolling Display plugin in the Playground which should hopefully play nicely with ESPEasy 114+, Core 2.3
R118 has compiled here fine. Thanks Neil!

Is there any chance of being able to send the OLED string values to display?

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: OLED Scrolling Display

#38 Post by timsson » 08 Aug 2016, 18:01

Is there any chance of being able to send the OLED string values to display?
yes:
http://www.esp8266.nu/index.php/OLEDDisplay
--> oled,1,1,test
but we need a change on _P210_MQTTImport.ino ;)

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: OLED Scrolling Display

#39 Post by namirda » 09 Aug 2016, 03:54

@jsilver,

OK - I have just uploaded yet another new version of the scrolling display to the playground which includes a write option.

The command syntax is either:

a) tskname,Line,String - where tskname is the name you have given to the scrolling oled task,
Line is the line number which must be an integer between 1 and 12,
String is the string to be displayed.

b) taskname,on or taskname,off To switch the display on or off

You can send the command using either http or mqtt or even via the webserver. To use mqtt, you should publish to the normal subscription topic of your esp followed by /cmd - e.g. /ESP01/cmd.

---------------------------------------
@timsson,

I think the above should satisfy all requirements - what is it exactly that you want?

Let me know how you get on....

N

User avatar
jsilver
Normal user
Posts: 23
Joined: 24 May 2016, 14:45
Location: Lewes, UK
Contact:

Re: OLED Scrolling Display

#40 Post by jsilver » 09 Aug 2016, 09:28

namirda wrote:OK - I have just uploaded yet another new version of the scrolling display to the playground which includes a write option.
That sounds incredibly useful, Neil... and very comprehensive functionality which should give everyone everything they need. I shall give it a go hopefully today.

A LITTLE LATER ON THAT DAY...

Well, everything seems to be working really well, except for one thing. I got MQTT commands working, but when I send a string with a space, only the first word is displayed. Is that a limitation of the Command module rather than your Framed OLED module?

LATER STILL...

Not sure if there's a better way to send commands with spaces, but I tried using the Unicode non-breaking space or hard-space character U+00A0 instead of space, and it worked, displaying fine on my OLED as a normal space. To get this character from your keyboard, hold down Alt and type 0160 on the numeric keypad.

Also there's an odd artefact in the serial log... this message, over and over again, after sending just one command to a newly booted device... the command is something like Disp,1,Hello!
  • OLED : Syntax Error in OLED command - Disp
This error message persists even after a reboot!

Jon

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: OLED Scrolling Display

#41 Post by timsson » 09 Aug 2016, 20:20

@timsson,I think the above should satisfy all requirements - what is it exactly that you want?
I would like import/send mqtt messages to the oled, but it is a mqt-plugin "problem"...
like this:
Oled:
Floor: open/closed
(MQTT-plugin Name: Window1 -- Topic 1:/ESP_03/window1 -- Value Name 1: -- Formula Value1: string(open/closed)
-> still only dezimal..
Thanks

Shantarius
New user
Posts: 3
Joined: 25 Jul 2016, 12:19

Re: OLED Scrolling Display

#42 Post by Shantarius » 09 Aug 2016, 23:28

R119 has compiled here fine. Thank You!

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: OLED Scrolling Display

#43 Post by namirda » 10 Aug 2016, 04:43

@JSilver

Yes indeed! The routine I used for splitting the command into component parts was an ESPEasy routine from misc.ino and I had not noticed that it used both comma and space as delimiter - hence your problem when trying to display strings with spaces. Now fixed in the playground.

The problem with the recurring syntax errors is partly due to you talking to yourself Jon!

I rather suspect that you have set your mqtt subscribe topic in such a way that your ESP listens to its own output - recursive confirmation bias! MQTT pubsub gets very confusing if you do this - even 'living fossils' should try to avoid the practise! The scrolling oled plugin by default outputs the status of the display and if you are not careful with your subscriptions, this output will subsequently be read as a command which could possibly cause a recurring syntax error as you have noted. I have made a small change in the software which should reduce this problem but it is even better to avoid it completely by modifying your pub and sub strings.

I use the following pub/sub strings to avoid the 'feedback' problem:

subscribe /%sysname%-IN/#
publish /%sysname%/%tskname%/%valname%

I really hope it works for you now.

N
Last edited by namirda on 10 Aug 2016, 07:30, edited 4 times in total.

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: OLED Scrolling Display

#44 Post by namirda » 10 Aug 2016, 05:04

@timsson

Sorry but I still don't think I understand your problem.

However, I think you are asking for MQTTImport to import strings and not only floating point values?? If that is the case then I don't think it is possible without major overhaul of ESPEasy - the whole framework is designed around sensors which output numerical values.

MQTTImport works in just the same way as all other sensors except that it reads it's numerical data from the MQTT broker rather than a locally attached device.

If you want to display an Open/Closed string on the OLED then this is not something MQTTImport can help you with.Instead you will simply have to send the strings directly to the Scrolling OLED plugin.

You might want to take a look at MQTTWARN which is a little python utility which is excellent at modifying and retransmitting MQTT messages - I think it could probably help you here.

Hope this helps

N

User avatar
jsilver
Normal user
Posts: 23
Joined: 24 May 2016, 14:45
Location: Lewes, UK
Contact:

Re: OLED Scrolling Display

#45 Post by jsilver » 10 Aug 2016, 10:42

namirda wrote:Now fixed in the playground.

Trying it now!
namirda wrote:The problem with the recurring syntax errors is partly due to you talking to yourself Jon!
Damn. The madness is getting to me.
MQTT pubsub gets very confusing if you do this - even 'living fossils' should try to avoid the practise!
Oi! Leave us elderly folks alone! :D
I see you found the in-joke my colleague left on our web site! :lol:
subscribe /%sysname%-IN/#
publish /%sysname%/%tskname%/%valname%
Good tip!
I really hope it works for you now.
I'll let you know shortly...

A LITTLE LATER ON...

Yes. All seems perfect. And since my ESP sensors were all publishing to sensors/%sysname%...etc, I've just changed the root of the MQTT topic for subscribing, which makes a lot more sense anyway. Thanks again Neil! :D

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: OLED Scrolling Display

#46 Post by Drum » 12 Aug 2016, 13:52

Okay, I am trying this on the "adafruit Oled feather" and it works better than the standard plug in. It is 128 x 32 so with the Header and footer you can only get 1 line in and be able to read it. It has 3 buttons on the board, I tested "C" which goes to GPIO2 and it works perfect. On this display the header is wasted, you can't read it at all. If i could figure out a way to remove the header and footer I would check to see if 2 lines would fit, and maybe insert the header info as a scrolling divider between the frames but drop the footer altogether.

One other interesting difference, everything is upside down... On the adafruit site they show the buttons on the left, but with this plugin, they are on the right. Not a problem just different.

Now to see if I can get the 8 channel PWM controller for it to work as well.

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: OLED Scrolling Display

#47 Post by timsson » 15 Aug 2016, 14:17

namirda wrote:@timsson
...Instead you will simply have to send the strings directly to the display
Hope this helps
N
Ok, now i use openhab and send this via http - it works :D
- rename displayname: 03_oled and send:
http://ip/tools?cmd=03_oled%2C1%2CWindows+open%3A
http://ip/tools?cmd=03_oled%2C2%2C4
Delay:6
Thanks!

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: OLED Scrolling Display

#48 Post by timsson » 17 Aug 2016, 17:26

Hi,
is it possible that somebody integrate an other driver?
I have several 1.3oled with SH1106.. who can help me
http://www.esp8266.nu/forum/viewtopic.p ... 8650#p8650

happytm
Normal user
Posts: 107
Joined: 15 Aug 2016, 17:53

Re: OLED Scrolling Display

#49 Post by happytm » 19 Aug 2016, 03:49

Hi Namirda,

Thank you for your work on all these plugins. I am going to use all of them for my project.I would like to request a useful feature to this plugin which i am missing in my project.I would like to control some 4 dimmers with rotary encoder locally which will show target pwm set on oled screen for few seconds and then start doing the scrolling routine.some people uses menu system to do it. I have seen few example of this here :

https://www.youtube.com/watch?v=iHOKVtHnfko
https://www.youtube.com/watch?v=MzO__HCKP8I (using menu)

I do not have experience and capacity to do it myself and I do not know how difficult this will be to implement but it will sure be nice addition to scrolling display plugin.

Thanks

User avatar
jsilver
Normal user
Posts: 23
Joined: 24 May 2016, 14:45
Location: Lewes, UK
Contact:

Re: OLED Scrolling Display

#50 Post by jsilver » 23 Aug 2016, 11:34

Neil, a weird problem has arisen... and I'm not sure who to direct this at...

On recent builds, with OLED Framed included, I get "Low memory available, stability problems may occur" when compiling.
Whenever I go into the Devices page and do anything to do with OLED Framed, the device crashes.
I've tried your fix to webserver.ino, but to no avail.

Any ideas?

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: OLED Scrolling Display

#51 Post by costo » 23 Aug 2016, 13:02

@ jsilver

Try to remove some plugins you do not use, so you have more free memory and your device will not crash.

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: OLED Scrolling Display

#52 Post by namirda » 24 Aug 2016, 10:46

Sorry Jon - no idea.

I've never seen a compiler warning like that - does it come from the normal Arduino IDE or are you using VS?

I have just downloaded R124 to give it a try and it seems to work OK for me.

Does the same config run properly on an earlier version of ESPEasy but not on R124?

Costo seems to think it is a shortage of memory and he may well be right - both MQTT Import and Framed OLED are memory hogs! Do you have a lot of other active plugins in your sketch?

Sorry I can't be more help - I will play with it a bit more and get back to you if I find anything.

N

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: OLED Scrolling Display

#53 Post by timsson » 11 Sep 2016, 15:42

... a litte bug:
If you use the same topic twice or 3 time - the oled show nothing :(
(i use openhab mqtt - R131, frameOled v0.4)
-----
Line 1: [sys#wifi]
Line 2: [sys#uptime]
Line 3: [sys#freeram]

uhrheber
Normal user
Posts: 22
Joined: 26 Sep 2016, 14:03

Re: OLED Scrolling Display

#54 Post by uhrheber » 10 Oct 2016, 15:29

namirda,

I can confirm that it works. Wemos D1 Mini, Wemos D1 Oled shield, BME280. Display cycles through temperature, humidity, air pressure and time.

The only issue is, that the Wemos Oled display is smaller than the normal ones, it has only 64 x 48 pixels.
The standard Oled plugin has now an option for those small displays, do you think you could add that also in your plugin?

Many thanks
Uhrheber

NightBird
Normal user
Posts: 24
Joined: 02 Dec 2016, 17:54

Re: OLED Scrolling Display

#55 Post by NightBird » 02 Dec 2016, 18:15

Hi,

I try to compile the FrameOLED plugin for using it with a SH1106 based display.
No success at this point :cry:

I'm able to compile the *regular* source (I tried with R147 and it seems to work : no errors when compiled)
I'm a perfect newbie in the Arduino world, and I don't know how to modify the source for that purpose.

Is there anybody to help for adding SH1106 support to that plugin ?
ESPEasy running on ESP-12F self-made modules (with various sensors) and talking to Domoticz (hosted on RPi2)

bart_l
New user
Posts: 1
Joined: 08 Dec 2016, 13:21

Re: OLED Scrolling Display

#56 Post by bart_l » 08 Dec 2016, 13:23

Hello,

Maybe someone could post a link to compilled firmware with this plugin?

Thanks
Bart

smolz
New user
Posts: 2
Joined: 12 Dec 2016, 19:24

Re: OLED Scrolling Display

#57 Post by smolz » 12 Dec 2016, 19:25

bart_l wrote:Hello,

Maybe someone could post a link to compilled firmware with this plugin?

Thanks
Bart

Ohh man that would be great! Please!

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: OLED Scrolling Display

#58 Post by namirda » 14 Dec 2016, 05:40

Hi,

Give this a try....

https://dl.dropboxusercontent.com/u/357 ... edOLED.bin

This is ESP Easy R147 including MQTTImport and FramedOLED compiled for 4Mb Flash with 1Mb SPIFFS.

I don't understand where the problem is to compile this yourself??

Good luck.

n

NightBird
Normal user
Posts: 24
Joined: 02 Dec 2016, 17:54

Re: OLED Scrolling Display

#59 Post by NightBird » 14 Dec 2016, 19:22

Hi all,

@ namirda

I love your plugin. I use it as replacement for the 'standard' OLED plugin.

I would like to use it with a SH1106 based 1.3" OLED, but it doesn't work. Garbage on screen, only few lines on top & bottom are readable.
I'm able to compile the source code, butI don't know how to modify your code to make it work with that kind of display.

Do you have time to help me ?
ESPEasy running on ESP-12F self-made modules (with various sensors) and talking to Domoticz (hosted on RPi2)

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: OLED Scrolling Display

#60 Post by namirda » 14 Dec 2016, 20:07

Hi NightBird,

It's not so much that I don't have time - it's more that I don't have a SH1106 device to play with!

A quick Google search tells me that they are very similar to the SSD1306 and there is at least one library out there which would probably work for you. For example, take a look at

https://github.com/wonho-maker/Adafruit_SH1106

There is also a discussion on the differences between the two here

https://forum.arduino.cc/index.php?topic=256374.0

I'm sure you can make it work - it would make a nice little learning exercise. If not then just buy a 1306 - they are so very cheap!!

Good luck

n

NightBird
Normal user
Posts: 24
Joined: 02 Dec 2016, 17:54

Re: OLED Scrolling Display

#61 Post by NightBird » 14 Dec 2016, 23:34

Thanks, I will try to play with that stuff.

I'm not a developer (especially on Arduino platform), but if I can get success, I will share the code here, if someone is interested ;)
I already have some SSD1306 displays, but these are 0.96", which is a little small. Unfortunately, the 1.3" models seem to use only the SH1106 controller (and are cheap, too !)

So I will do my best...
ESPEasy running on ESP-12F self-made modules (with various sensors) and talking to Domoticz (hosted on RPi2)

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: OLED Scrolling Display

#62 Post by costo » 22 Dec 2016, 01:42

NightBird, I modify the original OLED display for use with SH1106 OLED.

SH1106 has 4 more rows, it is a 132*64 OLED.
Screen has to be properly cleared, all 132 rows, which must be done like this in the OLED plugin:

change line 415 : for (i = 0; i < 128; i++) //clear all COL
into this line 415: for (i = 0; i < 132; i++) //clear 132 COL

The first 2 rows are normally not visible, causing misformed characters therefor the text has to shift 2 pixels to the right by:

change line 473 : Plugin_023_sendcommand(0x00 + (8 * col & 0x0f)); //set low col address
into this line 473: Plugin_023_sendcommand(0x02 + (8 * col & 0x0f)); //set low col address + 0x02 pixels offset

I guess this should work and maybe this can be done in the scrolling OLED plugin too.

NightBird
Normal user
Posts: 24
Joined: 02 Dec 2016, 17:54

Re: OLED Scrolling Display

#63 Post by NightBird » 26 Dec 2016, 17:22

Hi Costo,

thank you very much for that tip. I will try by myself.
ESPEasy running on ESP-12F self-made modules (with various sensors) and talking to Domoticz (hosted on RPi2)

jongerenchaos
Normal user
Posts: 11
Joined: 21 Jan 2016, 22:28

Re: OLED Scrolling Display

#64 Post by jongerenchaos » 05 Jan 2017, 20:53

Thanks for this scrolling option it works OK with one display! When you add another second OLED display (3C & 3D) it doesn't work and one display displayed only the WIFI logo. Can you fix this so that everyone can use two of this displays?

Fasthook
New user
Posts: 2
Joined: 15 Jan 2017, 16:59

Re: OLED Scrolling Display

#65 Post by Fasthook » 21 Jan 2017, 14:29

Namirda,

Thank you for this plugin, I used it for my CO2 / Temperature / Humidity meter to create a local display. Now it is no longer required to pick up the phone and look at the values in Domoticz :D

rlust
New user
Posts: 7
Joined: 13 Jan 2017, 20:30

Re: OLED Scrolling Display

#66 Post by rlust » 23 Jan 2017, 15:24

Drum wrote:Okay, I am trying this on the "adafruit Oled feather" and it works better than the standard plug in. It is 128 x 32 so with the Header and footer you can only get 1 line in and be able to read it. It has 3 buttons on the board, I tested "C" which goes to GPIO2 and it works perfect. On this display the header is wasted, you can't read it at all. If i could figure out a way to remove the header and footer I would check to see if 2 lines would fit, and maybe insert the header info as a scrolling divider between the frames but drop the footer altogether.

One other interesting difference, everything is upside down... On the adafruit site they show the buttons on the left, but with this plugin, they are on the right. Not a problem just different.

Now to see if I can get the 8 channel PWM controller for it to work as well.
Have you been able to get the Feather OLED working with 2 lines of display and scrolling header?

joedi
New user
Posts: 2
Joined: 02 Feb 2017, 09:50

Re: OLED Scrolling Display

#67 Post by joedi » 02 Feb 2017, 11:37

A feature request: it would be great if it was possible to send pixel data to the OLED display.
Plain text is already great, but having the option to draw icons/images through web commands would be a wonderful extension.

martie
New user
Posts: 2
Joined: 12 Feb 2017, 13:37

Re: OLED Scrolling Display

#68 Post by martie » 12 Feb 2017, 13:45

Got the scrolling display working fine, i like te big fonts !
However i want to be able to change / add a message to the display via a linux machine in this network.
I am able to turn the display on/off via the curl command, sending a text via "curl IP_esp_easy/control?cmd=oled,1,1,text" does show the text in small font. How can i send this text to be displayed in the big font?
Hope someone can help me ...

martie
New user
Posts: 2
Joined: 12 Feb 2017, 13:37

Re: OLED Scrolling Display

#69 Post by martie » 14 Feb 2017, 21:13

i just figured it out, maybe it helps others so i post it here:

Note the name you give the OLED display on the Devices page, in my case i named it "Display".

To change a text on line 4 via http:
http://IP_number_ESP_device/control?cmd=Display,4,text_without_spaces

To switch off :
http://IP_number_ESP_device/control?cmd=Display,off

To switch on:
http://IP_number_ESP_device/control?cmd=Display,on

Be aware that every update of text is done via a write procedure on the Flash memory of the module, as you know flash memory has a limit on the times you can write to it.
Have FUN with this nice product!

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: OLED Scrolling Display

#70 Post by Drum » 20 Feb 2017, 09:40

rlust wrote:
Drum wrote:Okay, I am trying this on the "adafruit Oled feather" and it works better than the standard plug in. It is 128 x 32 so with the Header and footer you can only get 1 line in and be able to read it. It has 3 buttons on the board, I tested "C" which goes to GPIO2 and it works perfect. On this display the header is wasted, you can't read it at all. If i could figure out a way to remove the header and footer I would check to see if 2 lines would fit, and maybe insert the header info as a scrolling divider between the frames but drop the footer altogether.

One other interesting difference, everything is upside down... On the adafruit site they show the buttons on the left, but with this plugin, they are on the right. Not a problem just different.

Now to see if I can get the 8 channel PWM controller for it to work as well.
Have you been able to get the Feather OLED working with 2 lines of display and scrolling header?

No, not yet. I have not had time to get back in to this for a couple of months. The header needs to go, and for the standard plugin the font is too big. Hopefully I can get back into this next month.

starfish
Normal user
Posts: 38
Joined: 16 Feb 2017, 23:46

Re: OLED Scrolling Display

#71 Post by starfish » 21 Feb 2017, 01:43

wow, finally I got it, this plugin is even better than I thought. glad, that the MQTT-import plugin is no longer needed, as I have no success in compiling that one, no matter, what combination of arduino and esp.package I am using.

writing the strings works fine, but I can not switch on / off the OLED using MQTT, as shown in option b) below: taskname,on or off.
is this by design?
namirda wrote:
OK - I have just uploaded yet another new version of the scrolling display to the playground which includes a write option.

The command syntax is either:

a) tskname,Line,String - where tskname is the name you have given to the scrolling oled task,
Line is the line number which must be an integer between 1 and 12,
String is the string to be displayed.

b) taskname,on or taskname,off To switch the display on or off

You can send the command using either http or mqtt or even via the webserver. To use mqtt, you should publish to the normal subscription topic of your esp followed by /cmd - e.g. /ESP01/cmd.

starfish
Normal user
Posts: 38
Joined: 16 Feb 2017, 23:46

Re: OLED Scrolling Display

#72 Post by starfish » 24 Feb 2017, 17:44

Success - using newest espeasy R148 from github and Arduino IDE 1.8.1 with esp8266 board package v. 2.3.0
P210_MQTTImport.ino is already provided and works out of the box. P205_Frame_OLED.ino together with Extra_Utilities.ino compiles without error. :lol: :lol:
removed all arduino remainings on PC and did clean portable install. moved libraries from old R120 and esp8266-oled-ssd1306 lib from playground to portable/sketchbook/libraries and R148 as well as 205_Frame_OLED.ino and Extra_Utilities.ino to portable/sketchbook/ESPEasy

velja
Normal user
Posts: 31
Joined: 08 Feb 2017, 08:07

Re: OLED Scrolling Display

#73 Post by velja » 14 Mar 2017, 20:18

@starfish;
Can you make OTA version R148 (or R147) with P205_Frame_OLED.ino for 1M and 4M flash version for us wich not familiar with Arduino IDE?

Thanks

starfish
Normal user
Posts: 38
Joined: 16 Feb 2017, 23:46

Re: OLED Scrolling Display

#74 Post by starfish » 16 Mar 2017, 17:34

velja wrote: 14 Mar 2017, 20:18 @starfish;
Can you make OTA version R148 (or R147) with P205_Frame_OLED.ino for 1M and 4M flash version for us wich not familiar with Arduino IDE?

Thanks
tried to upload - but apparently the zip file is too large ... (300kb)

starfish
Normal user
Posts: 38
Joined: 16 Feb 2017, 23:46

Re: OLED Scrolling Display

#75 Post by starfish » 16 Mar 2017, 17:55

now with split 7z files .... remove the .7z at the end so that .001 / .002 / .003 is left and try to join them whit 7zip - hope it works
ESPEasy.ino.generic.7z.001.7z
(100 KiB) Downloaded 429 times
ESPEasy.ino.generic.7z.002.7z
(100 KiB) Downloaded 501 times
ESPEasy.ino.generic.7z.003.7z
(71.04 KiB) Downloaded 506 times
this one is for 1M

try this https://github.com/letscontrolit/ESPEas ... 0-dev7.zip inside the zip look out for
ESPEasy_v2.0.0-dev7_normal_1024.bin and ESPEasy_v2.0.0-dev7_normal_4096.bin this should do the job too - scrolling oled is included but I didnt test it myself. sorry, bad idea http and mqtt string upload to the 12 lines in framed oled has been removed by the dev's for reaons. use v. 148 or below.
Last edited by starfish on 06 Jul 2017, 05:36, edited 2 times in total.

velja
Normal user
Posts: 31
Joined: 08 Feb 2017, 08:07

Re: OLED Scrolling Display

#76 Post by velja » 16 Mar 2017, 18:05

Thanks, Is it for 1M or for 4M flash?

velja
Normal user
Posts: 31
Joined: 08 Feb 2017, 08:07

Re: OLED Scrolling Display

#77 Post by velja » 16 Mar 2017, 20:06

Yes, it works! I use v2.0.0.0.dev7 for 4M flash, it show in drop menu framed OLED, I configure everything and it works. Problem is difficult global sync. I think much more harder to syncing two units than earlier.

starfish
Normal user
Posts: 38
Joined: 16 Feb 2017, 23:46

Re: OLED Scrolling Display

#78 Post by starfish » 16 Mar 2017, 20:52

the 7zip files are R148 1M only the newest dev. Version (link) has both 1M and 4M . But please note, that I didnt test OTA - I was flashing them all using the USB converter and Arduino IDE and the Platformio toolchains. dont forget that 2.0.0 is in early stage.

velja
Normal user
Posts: 31
Joined: 08 Feb 2017, 08:07

Re: OLED Scrolling Display

#79 Post by velja » 16 Mar 2017, 21:17

I try second unit with file you send me and it's work through OTA. Problem is with V 2.0.0.0 dev7 and Global sync. I use as I use it before but only BME280 sinc. Earlier, I left blank task on ESP with display and it been populated after few minutes. Now it doesn't work.

starfish
Normal user
Posts: 38
Joined: 16 Feb 2017, 23:46

Re: OLED Scrolling Display

#80 Post by starfish » 17 Mar 2017, 11:04

@velja sorry dont know your setup (displaying sensor data from another 8266-unit?) I am displaying data sent frame by frame from the linux home control system by mqtt.
Image
do you need 4 M-binaries of the 148 version? (what spiffs size?) Concerning the espeasy code you have to contact the authors.
sorry, in V. 2 (mega) http and mqtt string upload to the 12 lines in framed oled has been removed by the dev's for reaons. use v. 148 or below.
Last edited by starfish on 06 Jul 2017, 05:41, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 41 guests