SSD1306 OLED - sample code isn't working #853
Replies: 31 comments
-
Posted at 2015-11-11 by bigplik now I fixed timeouts, added 4,7k resistors from sda and scl to vdd, but can't see nothing on the screen, but Arduino code works and run display, fixed ;) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-11 by @gfwilliams What size is your display? The default is for 128x64, but if you want to use 128x32 you have to use the code on the second half of the SSD1306 page. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-02 by bigplik can't find command for screen rotation in ssd1306 graphic library, is there any? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-03 by DrAzzy I think the graphics library has that? See the reference pages |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-03 by @gfwilliams Yes, it's literally just |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-14 by bigplik thank you for rotation tip, since couple days I wonder how to write proper code to make something like display few screens on the ssd1306, let say 3 of them, and every screen will display different values, I made simple code where espruino count how many times I press the button, then depend of the number will change the screen display, but there is some issue, until I put on the display some value once (without setInterval ) then it works fluently, but when I put setInterval() function (for analog readings) I have some lag, and can't switch between screens smoothly
where could be something wrong in my code? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-14 by @gfwilliams What happens if you do:
When you run Could that be explaining the delay you have? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-14 by bigplik in my code button didn't react for every press I did, after 8-9 times it stock for a while, and working again and then stock next time, would like to make this screen change smooth, no lags |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-14 by @gfwilliams I'm afraid I don't really know why that would be then... What happens when you uncomment |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-14 by bigplik yes, numbers printed into console stop when I have the problem with the button |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-14 by @gfwilliams Are you sure it's not just an electrical problem with the way the button is wired up? What happens if you use the on-board button? Does it also have the problem? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-14 by bigplik I checked that, even if I use internal BTN it still stop after several times, sometimes after tens of times, then works again, and stock, still same, maybe is something wrong in the construction of my code? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-13 by bigplik any idea what can I do to get smooth change between screens? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-13 by @gfwilliams You're still having the exact same problem with it? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-18 by bigplik yes, it stops after several dozen press of the button, then works again and next stops |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-18 by @gfwilliams Try using the binary from http://www.espruino.com/binaries/git/commits/master/ in about half an hours' time and you should get a new firmware with it fixed |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-18 by luwar I think the usage of Or is there any safe usecase for clearInterval(void) which I don't see? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-19 by @gfwilliams Well, at the start of In a small bit of code like above I don't think it's too bad as it won't interfere with anything else - but then again, if the code is that small, it's not too hard to keep track of intervals :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-19 by bigplik thank you Gordon, will check it today later on with new firmware |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-03 by bigplik Could anyone help to solve an issue with my code?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-03 by @gfwilliams Are you using an up to date firmware (1v85)? You had some problem like this before (caused by a global |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-03 by bigplik I have version 1v85 and it isn't work, I have that error I described above |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-03 by @gfwilliams You know you've misspelt
When you upload, do you not get any errors reported on the console? If you do, could you post them up? They might explain why it's not working. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-03 by bigplik yes, I found it myself Gordon ;) just wanted to post I found solution ;)
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-03 by @MaBecker took a copy of your code got syntax error on first line: "Unmatched '{' ." where does function OLED end ? ups, to slow, you alread found it by yourself ;-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-03 by bigplik found another issue, |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-03 by DrAzzy When you do setInterval or setTimeout they return a value. Pass that value to clearInterval and it will only clear that one. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-09 by bigplik @drazzy ,what is the proper code form to stop interval that way you said?
and it works when I typed it into console, |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-09 by MrTimcakes DrAzzy means when you set your interval you assign it to a global variable. For example
You would call clearInterval(interval) to stop only this interval. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-10 by @gfwilliams @ducky thanks! I just edited your post above to change |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-11-11 by bigplik
Hi, I've used code to run ssd1306 display from Espruino Web but it has some error
code I used
error I've got
anyone knows how to fix it?
Beta Was this translation helpful? Give feedback.
All reactions