Skip to content
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

Fix setting I2C address on ATtinys #94

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

caternuson
Copy link
Contributor

For #93.

Tested on a PID 5743 (gamepad) using following sketch to change I2C address:

#include "Adafruit_seesaw.h"

#define OLD_ADDR 0x50
#define NEW_ADDR 0x55

Adafruit_seesaw ss;

void setup() {
  Serial.begin(9600);
  while (!Serial);

  Serial.println("EEPROM I2C address change test.");

  if (!ss.begin(OLD_ADDR)) {
    Serial.println("seesaw not found.");
    while(1);
  }

  Serial.println("seesaw started.");

  Serial.println("Changing I2C address...");
  ss.setI2CAddr(NEW_ADDR);
  Serial.println("Done.");
}

void loop() {
}

NOTE - I2C breaks after the address change (after call to setI2CAddr())and the attempt to restart it doesn't seem to work. But power cycling works and the device comes up at the newly set I2C address.

@caternuson
Copy link
Contributor Author

@ladyada for review

@ladyada ladyada merged commit c1cd6b5 into adafruit:master Oct 27, 2023
10 checks passed
@ladyada
Copy link
Member

ladyada commented Oct 27, 2023

thank you!

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.

2 participants