SpenceKonde / ATTinyCore

Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8
Other
1.58k stars 306 forks source link

ATTINY88 I2C not working #679

Closed AxelROGET closed 2 years ago

AxelROGET commented 2 years ago

Hi, I have a simple code to communicate between an Arduino Uno and an ATTINY88 : Master (Arduino Uno) :

#include <Wire.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Wire.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
  Wire.requestFrom(1, 1);
  int n = Wire.read();
  Serial.println(n);

  delay(100);
}

Slave (attiny88) :

#include <Wire.h>

void setup(){
  delay(50);
  Wire.begin(1);
  Wire.onRequest(requestEvent);
}

void loop(){

}

void requestEvent(){
  Wire.write(0);
}

Arduino Uno is connected to the computer Uno A5 <> attiny A5 Uno A4 <> attiny A4 Uno Ground <> attiny ground

It works perfectly bewteen two arduino uno

do you know where the problem could come from? thank you in advance

AxelROGET commented 2 years ago

i'm so upset, it was only a solder issue.

Sorry for the issue