Go Down

Topic: Why so many I2C devices? (Read 215 times) previous topic - next topic

sevenoutpinball

I define this:


#include <DS3231.h>
#define DS3231_I2C_ADDRESS 0x68
DS3231  rtc(SDA, SCL);
#include <SPI.h>   
#include <WiFiNINA.h>  // for use with Arduino Uno WiFi Rev2
#include <Wire.h>
#include <FastLED.h>
#define LED_PIN     3
#define NUM_LEDS    50
#define BRIGHTNESS  240
#define LED_TYPE    WS2811
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];

and get a slew of error messages.

If I comment out the DS3231 stuff I still get this when running I2C scanner. 
Scanning...
I2C device found at address 0x01  !
I2C device found at address 0x02  !
I2C device found at address 0x03  !
I2C device found at address 0x04  !
I2C device found at address 0x05  !
I2C device found at address 0x06  !
I2C device found at address 0x07  !
I2C device found at address 0x08  !
I2C device found at address 0x09  !
I2C device found at address 0x0A  !
I2C device found at address 0x0B  !
I2C device found at address 0x0C  !
I2C device found at address 0x0D  !
I2C device found at address 0x0E  !
I2C device found at address 0x0F  !
I2C device found at address 0x10  !
I2C device found at address 0x11  !
I2C device found at address 0x12  !
I2C device found at address 0x13  !
I2C device found at address 0x14  !
I2C device found at address 0x15  !
I2C device found at address 0x16  !
I2C device found at address 0x17  !
I2C device found at address 0x18  !
I2C device found at address 0x19  !
I2C device found at address 0x1A  !
I2C device found at address 0x1B  !
I2C device found at address 0x1C  !
I2C device found at address 0x1D  !
I2C device found at address 0x1E  !
I2C device found at address 0x1F  !
I2C device found at address 0x20  !
I2C device found at address 0x21  !
I2C device found at address 0x22  !
I2C device found at address 0x23  !
I2C device found at address 0x24  !
I2C device found at address 0x25  !
I2C device found at address 0x26  !
I2C device found at address 0x27  !
I2C device found at address 0x28  !
I2C device found at address 0x29  !
I2C device found at address 0x2A  !
I2C device found at address 0x2B  !
I2C device found at address 0x2C  !
I2C device found at address 0x2D  !
I2C device found at address 0x2E  !
I2C device found at address 0x2F  !
I2C device found at address 0x30  !
I2C device found at address 0x31  !
I2C device found at address 0x32  !
I2C device found at address 0x33  !
I2C device found at address 0x34  !
I2C device found at address 0x35  !
I2C device found at address 0x36  !
I2C device found at address 0x37  !
I2C device found at address 0x38  !
I2C device found at address 0x39  !
I2C device found at address 0x3A  !
I2C device found at address 0x3B  !
I2C device found at address 0x3C  !
I2C device found at address 0x3D  !
I2C device found at address 0x3E  !
I2C device found at address 0x3F  !
I2C device found at address 0x40  !
I2C device found at address 0x41  !
I2C device found at address 0x42  !
I2C device found at address 0x43  !
I2C device found at address 0x44  !
I2C device found at address 0x45  !
I2C device found at address 0x46  !
I2C device found at address 0x47  !
I2C device found at address 0x48  !
I2C device found at address 0x49  !
I2C device found at address 0x4A  !
I2C device found at address 0x4B  !
I2C device found at address 0x4C  !
I2C device found at address 0x4D  !
I2C device found at address 0x4E  !
I2C device found at address 0x4F  !
I2C device found at address 0x50  !
I2C device found at address 0x51  !
I2C device found at address 0x52  !
I2C device found at address 0x53  !
I2C device found at address 0x54  !
I2C device found at address 0x55  !
I2C device found at address 0x56  !
I2C device found at address 0x57  !
I2C device found at address 0x58  !
I2C device found at address 0x59  !
I2C device found at address 0x5A  !
I2C device found at address 0x5B  !
I2C device found at address 0x5C  !
I2C device found at address 0x5D  !
I2C device found at address 0x5E  !
I2C device found at address 0x5F  !
I2C device found at address 0x60  !
I2C device found at address 0x61  !
I2C device found at address 0x62  !
I2C device found at address 0x63  !
I2C device found at address 0x64  !
I2C device found at address 0x65  !
I2C device found at address 0x66  !
I2C device found at address 0x67  !
I2C device found at address 0x68  !
I2C device found at address 0x69  !
I2C device found at address 0x6A  !
I2C device found at address 0x6B  !
I2C device found at address 0x6C  !
I2C device found at address 0x6D  !
I2C device found at address 0x6E  !
I2C device found at address 0x6F  !
I2C device found at address 0x70  !
I2C device found at address 0x71  !
I2C device found at address 0x72  !
I2C device found at address 0x73  !
I2C device found at address 0x74  !
I2C device found at address 0x75  !
I2C device found at address 0x76  !
I2C device found at address 0x77  !
I2C device found at address 0x78  !
I2C device found at address 0x79  !
I2C device found at address 0x7A  !
I2C device found at address 0x7B  !
I2C device found at address 0x7C  !
I2C device found at address 0x7D  !
I2C device found at address 0x7E  !
Flash is fast, Flash is cool.
Not affiliated in any way, shape, or form with
Python (Monty) Productions Ltd.
Well, possibly an occasional form here or there as it might be,
but nothing too expensive.

vaj4088

No wiring diagram. No Arduino information. No code tags. No error messages. No help.


sevenoutpinball

Uno Wifi Rev2
and nothing is plugged into SDA or SCL

Fastled is on pin 6 and not working.
i deleted everything related to the DS3231, that simply will not work on this board, darn.

this is the scanner code I got from around here somewhere.

void scanner() {
  byte error, address;
  int nDevices;
  God16 = "Scanning...";   GodOut();
  nDevices = 0;
  for (address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.print(address, HEX);
      Serial.println("  !");
      nDevices++;
    }
    else if (error == 4)
    {
      Serial.print("Unknown error at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.println(address, HEX);
    }
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");
}

Flash is fast, Flash is cool.
Not affiliated in any way, shape, or form with
Python (Monty) Productions Ltd.
Well, possibly an occasional form here or there as it might be,
but nothing too expensive.

arduarn

nothing is plugged into SDA or SCL
That means the pins are floating and will read with spurious values. Connect each to 4.7k pull-up resistors.

sevenoutpinball

Oh brother.  This uno wifi  rev2 is a real doozy.  Thanks for helping.
Flash is fast, Flash is cool.
Not affiliated in any way, shape, or form with
Python (Monty) Productions Ltd.
Well, possibly an occasional form here or there as it might be,
but nothing too expensive.

Juraj

Uno WiFi has 2 or 3 onboard devices on I2C. how could the pins float?
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

sevenoutpinball

is the wifi connected to i2 internally? probably that motion thing too that most of us will never use.
Flash is fast, Flash is cool.
Not affiliated in any way, shape, or form with
Python (Monty) Productions Ltd.
Well, possibly an occasional form here or there as it might be,
but nothing too expensive.

bperrybap

I'd be curious as to the output you see when you run the I2CexpDiag sketch that is included in the hd44780 library.
It is designed to do a diagnostic for an hd44780 LCD that is using an i2c backpack, but it includes a i2c diagnostic as well that checks the SDA and SCL signals for pullups and shorts.

--- bill

sevenoutpinball

i gave up and am back to nodemcu esp...
Flash is fast, Flash is cool.
Not affiliated in any way, shape, or form with
Python (Monty) Productions Ltd.
Well, possibly an occasional form here or there as it might be,
but nothing too expensive.

Juraj

i gave up and am back to nodemcu esp...
you had not the right pins for i2c
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

bperrybap

you had not the right pins for i2c
Another good thing about I2CexpDiag is that it will print out the pins being use by SDA and SCL.

Go Up