SSD1306 OLED module with different I2C address #698
Replies: 3 comments
-
Posted at 2015-02-26 by DrAzzy If you define modules location in the IDE (using the sandbox thingie - not sure if there's something else you're talking about), when you require() a module, it will look in the modules location first. Failing that, it will try to get it online. So you can just set a local location for modules and put your one modified version there, and you're good. That said, the correct solution is to modify the ssd1306 module so it takes an extra parameter in connect, and submit that via a pull request to the EspruinoDocs github so everyone can use it. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-02-27 by Spocki Thanks for the explanation, @drazzy. So I can use the require() mechanism for modularisation of my project into several files, too? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-02-27 by @gfwilliams
Yes, absolutely! You can also But as @drazzy says, if the I2c address can be changed, it'd be great if you could submit an updated module so others don't hit the same problem |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-02-26 by Spocki
I bought modules with different I2C addresses than the Crius module. I could change the address in the ssd1306.js, but then I think I have to store this somewhere locally. But one can define only one modules location in WebIDE, so I have to store all modules locally.
Am I right? If not, how can I do this? Or would it be better to change the module with an address parameter in the .connect function?
Sorry for this noob question, I'm new in event driven JavaScript. Be aware, more noob questions to come ;-)
Beta Was this translation helpful? Give feedback.
All reactions