Skip to content

libraries/Wire: Add support for target mode. #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: arduino
Choose a base branch
from

Conversation

iabdalkader
Copy link

@iabdalkader iabdalkader commented Jul 29, 2025

Test sketch:

#include <Wire.h>

void onRequest() {
  Wire.write("HelloWorld!");
}

void onReceive(int howMany) {
  while (Wire.available()) {
    char c = Wire.read();
    Serial.print(c);
  }
  
  if (howMany) {
    Serial.println("");
  }
}

void setup() {
  Serial.begin(115200);
  Wire.begin(8);
  Wire.onRequest(onRequest);
  Wire.onReceive(onReceive);
}

void loop() {
  delay(1000);
}

Retested master mode with VL53L1X and target mode with bus pirate:

image

@iabdalkader iabdalkader force-pushed the wire_updates branch 3 times, most recently from 688e167 to f60ee5c Compare July 29, 2025 17:39
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@iabdalkader iabdalkader force-pushed the wire_updates branch 2 times, most recently from 34d274e to 82a157a Compare July 31, 2025 12:13
@iabdalkader iabdalkader marked this pull request as ready for review July 31, 2025 12:14
@iabdalkader iabdalkader force-pushed the wire_updates branch 4 times, most recently from 04f6ec9 to 39dae18 Compare July 31, 2025 13:57
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy