# I2C between two RedBoard Artemis

**URL:** <https://community.sparkfun.com/t/i2c-between-two-redboard-artemis/47052>\
**Category:** Artemis\
**Created:** [March 1, 2024, 7:14pm UTC](https://community.sparkfun.com/t/i2c-between-two-redboard-artemis/47052 "2024-03-01T19:14:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DizietAsahi](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@DizietAsahi](https://community.sparkfun.com/u/DizietAsahi)\
**Post date:** [March 1, 2024, 7:14pm UTC](https://community.sparkfun.com/t/i2c-between-two-redboard-artemis/47052/1 "2024-03-01T19:14:57Z")

</div>

Hi,

For the life of me, I cannot get two Artemis RedBoard to talk to each other over I2C and I don’t understand why.

I have stripped everything from the boards the only connections I have are (top right of the board, near the USBC connector)

Controller Target

* * *

SCL \<------------------\> SCL

SDA \<------------------\> SDA

GND \<------------------\> GND

I uploaded the code from the Arduino doc

Controller:

```auto
// Wire Controller Reader
// by Nicholas Zambetti [http://www.zambetti.com](http://www.zambetti.com)

// Demonstrates use of the Wire library
// Reads data from an I2C/TWI peripheral device
// Refer to the "Wire Peripheral Sender" example for use with this

// Created 29 March 2006

// This example code is in the public domain.

#include <Wire.h>

void setup() {
  Wire.begin(); // join i2c bus (address optional for master)
  Serial.begin(9600); // start serial for output
}

void loop() {
  Wire.requestFrom(8, 6); // request 6 bytes from peripheral device #8

  while (Wire.available()) { // peripheral may send less than requested
    char c = Wire.read(); // receive a byte as character
    Serial.print(c); // print the character
  }

  delay(500);
}

```

Target:

```auto
// Wire Peripheral Sender
// by Nicholas Zambetti [http://www.zambetti.com](http://www.zambetti.com)

// Demonstrates use of the Wire library
// Sends data as an I2C/TWI peripheral device
// Refer to the "Wire Master Reader" example for use with this

// Created 29 March 2006

// This example code is in the public domain.

#include <Wire.h>

void setup() {
  Wire.begin(8); // join i2c bus with address #8
  Wire.onRequest(requestEvent); // register event
}

void loop() {
  delay(100);
}

// function that executes whenever data is requested by master
// this function is registered as an event, see setup()
void requestEvent() {
  Wire.write("hello "); // respond with message of 6 bytes
  // as expected by master
}

```

I am not seeing anything on the serial terminal. These are the signals that I see on the I2C bus (blue is SCL, yellow is SDA):

 ![PXL_20240301_190641384.jpg](https://canada1.discourse-cdn.com/sparkfun/original/3X/7/e/7e452f0d6dd8eda2f6f27f12e5e60f601fbe99c4.jpeg)

I have tested the exact same code between two esp32 and everything works as expected.

 ![PXL_20240301_191019386.jpg](https://canada1.discourse-cdn.com/sparkfun/original/3X/1/7/17705269b483eab28f08be5adc47af06305c3919.jpeg)

I don’t understand what I am doing wrong.

---

<div class="post-metadata">

**Author:** ![DizietAsahi](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@DizietAsahi](https://community.sparkfun.com/u/DizietAsahi)\
**Post date:** [March 2, 2024, 1:48am UTC](https://community.sparkfun.com/t/i2c-between-two-redboard-artemis/47052/2 "2024-03-02T01:48:52Z")

</div>

BTW, I also tried using a QWIIC cable between the two artemis, no luck. The Qwiic cable works between the two ESP32.

---

<div class="post-metadata">

**Author:** ![paulvha](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@paulvha](https://community.sparkfun.com/u/paulvha)\
**Post date:** [March 2, 2024, 8:14am UTC](https://community.sparkfun.com/t/i2c-between-two-redboard-artemis/47052/3 "2024-03-02T08:14:18Z")

</div>

The Sparkfun Artemis Wire library **does NOT support slave(peripheral)** mode. It can only act as a Master (controller).

It is half-documented in the README on [https://github.com/sparkfun/Arduino\_Apollo3](https://github.com/sparkfun/Arduino_Apollo3), but it is 100% sure as there is NO code to handle it.

You can connect an ESP32 as a peripheral to an Artemis running as a controller.

---

<div class="post-metadata">

**Author:** ![DizietAsahi](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@DizietAsahi](https://community.sparkfun.com/u/DizietAsahi)\
**Post date:** [March 3, 2024, 11:32am UTC](https://community.sparkfun.com/t/i2c-between-two-redboard-artemis/47052/4 "2024-03-03T11:32:40Z")

</div>

I see, thank you for the link. I had overlooked that part
