Link I2C input to an object's parameter

controllers
modular

#1

Hi all, I really need help with this as I barely know anything about programming and I need to solve this for my final degree project (It's about the Axoloti Board).
I was asked to add an I2C knob to control a parameter of an Axoloti object. Now I have an ATTiny connected to a knob, which output is an I2C value that goes from 0 to 255. What I need now is to use that output as an input in my board, and use that data to control any parameter of any object inside the patch, but I think I need to create a custom object for that and I don't know how to do it.

PLEASE HELP!!!!!!!!!!


#2

yeah since it is using the i2c protocol and probably hasn't been used on axoloti before you might have to write your own driver for it, or try copying from arduino world. since that might be asking too much, maybe we can help with alternate solutions if you describe the knob? or is the task just to implment i2c in general?

or if you can keep using the attiny, you could try have it send midi data to the axoloti
https://mitxela.com/projects/midi_on_the_attiny


#3

The original post is a bit short on details, so I'll make some assumptions.
First I'll assume he's using a normal pot, connected to analog input on ATTiny, to create an 'I2C pot'.
Next, I'll assume the ATTiny is programmed to perform as an I2C slave, which will return the value of the pot when read by the master.

If those assumptions are valid, the Axoloti object for reading mpr121 capacitive touch sensor should provide insight into how to access an I2C slave.


#4

You are right with your assumptions and I've been told before to use that mpr121 object, but as my programming knowledge level is barely none, I'm not able to adapt the object to my purpose.


#5

Using midi would make things a lot easier, but I've been asked to use the I2C protocol...


#6

well sorry but if you are asked to use i2c for your final degree project and you cannot do it even with some clues, then either they asked something too difficult and you should tell them or you did not do your "homework" until now.

i don't want to sound harsh, but you can't expect someone on a forum to do basically all the work for you.