Connecting Axoloti & Arduino via I2C


#1

Hey. I wanted to connect the Axoloti, Hohum Axoctrl, and Arduino Nano together via I2C.

My whole plan is to connect a bunch of RGB LEDs to the Arduino Nano, put the LEDs & Arduino Nano inside the Axoctrl, and finally using the Axoloti to control the LEDs.

Right now my first step is to figure out how to make the Axoloti & Arduino Nano communicate.

I'm aware that the Axoloti has GPIO ports that allows for controlling LEDs, but with the Axoctrl on top of the Axoloti, I2C seems like the best way to make the Axoloti communicate with the Nano.

I've read alot of forum posts on here about i2c. I'm fine with graphical patching but not line-by-line coding, so I don't understand how to build a custom i2c object. There's also a few posts that pointed to an i2c driver by chibios. What is that and how do I use it to make an i2c object?


#2

Axoloti uses the following gpio pins for i2c. The Hohum Axoctrl already uses I2C for the display. So you will have to communicate to the Arduino on an other address on the i2c bus, and probably solder some extra wires to these pins to connect to your Arduino.

  • PB9 = SDA (Data Signal)
  • PB8 = SCL (Clock Signal)

Chibios is the RTOS (real time operating system) used on the Axoloti.

I2C driver code from the Axoloti firmware can be found here.:


You will also need to write custom code for the Arduino in order to interpret the data coming from the Axoloti, since it won't know by default what the ones and zeroes you are sending mean.

This is a good tutorial to learn about i2c communication between two arduinos.
https://dronebotworkshop.com/i2c-arduino-arduino/

Not exactly something I would recommend as a first coding project, but good luck. :wink:


#3

There's actually holes on the Axoctrl for I2C connection. PB9 is connected to SDA, and PB8 is connected to SCL already. All I need to do is solder the pins.

I think the i2c arduino tutorial that you linked is good to follow. It seems easy to program the arduino to be an i2c slave. Now I need to know how to program the axoloti to be the master.