giuliomoro yeah tried the clean and wiring debugging.
the console prints the same lengthy remote errors in the console followed by this when trying to set mux
i2c multiplexer for oled's
sorry, one argument too many. I amended the lines above. Try again
giuliomoro yeah still errors. it displays in the console osc/test recieved
but nothing displays. the oled and code works fine when i comment out the mux and use just oled directly. so strange
vivian yeah still errors
what errors?
after you start the program and you send it
~displayOSC.sendMsg('/targetMode', 2); // stateful mode: target display can be set with: /target
~displayOSC.sendMsg('/target', 1); // change `1` to whatever multiplexer channel the display is connected
can you run i2cdetect -y -r 1
in the console at the bottom of the IDE and post the result?
giuliomoro
these remote errors.
So the OLED is correctly selected, as you can see from the 0x3c.
Those errors are the expected ones at startup. When you send /osc-test
do you get any further errors or printouts? Can you try other commands as well, from the local.scd file (use the ones without ~tar
)
giuliomoro the ide recieves it, but nothing prints on the oled
OK I think I fixed it in a new commit.
Update and follow the instructions from https://forum.bela.io/d/1668-i2c-multiplexer-for-oled-s/47 again and try again
giuliomoro yeah can confirm its working great.
the remote errors still run on build but functions well. thank u!!
great!
Nice!
giuliomoro quick question, im getting close to finishing this little project im working on and wanted to ask about the appropriate way to compile all the background scripts like the i2c encoders and i2c display...just all in one project?
It's probably best to have each of them as a separate process running on the board. Basically, go through these instructions twice, once per each program: https://learn.bela.io/using-bela/bela-techniques/running-a-program-as-a-service
@vivian excited to see the end result!
bela_robert ive still some work with trills to do but its getting there!
giuliomoro also slightly noob question but in the main cpp for the u82g how do i change 'parameters' from horizontal lines to vertical?
See the highlighted line and the following ones: https://github.com/giuliomoro/O2O/blob/main/main.cpp#L265
The "lines" are drawn with "drawBox". The parameter order seems to be:
(xstart, ystart, width, height). Fulll reference for that and the othwr u8g2 methods can be found here https://github.com/olikraus/u8g2/wiki/u8g2reference#drawbox
- Edited
@giuliomoro Is using osc to send messages to the screen for the purpose of making development easier or is there a specific functional / timing reason for setting up communications with oled displays this way? I only intend on sending updates to the screens from within my Bela.
There could be several reasons, but this is mainly down to separation of concerns.. It is a different process that has nothing to do with the Bela process. The process can be started before or after the audio-processing process, according to your requirements. The process can even crash and your audio code will keep running. You don't have to modify your Bela project to support the display(s) at a low level, so for instance you can reuse the same code to drive the display while your program only implements the message sending at a higher level. So much so that - and this is the "killer app" - you can send OSC from any language, without using or knowing C++. So your program can be Supercollider, PureData or Csound and you only have to send out OSC (which is relatively straightforward in any of these).
However, if you have a C++ Bela project, you can reduce the communication overhead and communicate to the screen directly using the C++ API rather than using OSC.