Public projects 3

Arduino Control Center

Project tutorial by Chip McClelland

  • 2,767 views
  • 6 comments
  • 29 respects

Garage Parking Sensor

Project tutorial by Chip McClelland

  • 6,305 views
  • 5 comments
  • 12 respects

Toolbox 2


Replicated projects 0

 Chip McClelland hasn't replicated any projects yet.

$20 Zigbee Door Chime

Project tutorial by BuddyC

  • 19,784 views
  • 9 comments
  • 41 respects

Smartwatch car remote

Project tutorial by Mika Wee

  • 11,696 views
  • 19 comments
  • 73 respects

IoT Garage Door Monitor/Opener with Finger Print Scanner

Project tutorial by PlastiBots.com

  • 7,960 views
  • 8 comments
  • 34 respects

  • Arduino I2C Multi-Master Approach - Why and How 25 days ago

    Tego, You are correct that using a rising or falling edge would be more precise and would eliminate contention. You had suggested an interrupt to do this but, I am not sure how to implement this given that the clock is running at about 32kHz. That interrupt would beed to be serviced and would eat a lot of clock cycles. I would be open to any suggestions you might have on making this work.

    I have build a deployed about a dozen of these sensors and they are running continuously. Collectively, they have years of operation and they have proven to be very reliable. I will say, however, that most of the issues that do require a watchdog timer reset are caused by the i2c bus. It may be contention or a hung request but, each device hangs only about once every 60 days so I have chosen to focus my efforts elsewhere and let the watchdog do its work. This may not be acceptable in some applications but it works for me.

    I would be interested in any suggestions you might have on a edge triggered approach.

    Thanks,

    Chip

  • Arduino I2C Multi-Master Approach - Why and How 25 days ago

    Tego,

    Thanks for taking a look. The issue you raise came up when I was working on this. The solution is to make a simple rule - each master is required to take the clock only on their assigned clock logic level. One is assigned to Clock LOW and the other to Clock HIGH.

    In this example, the SImblee can only take the bus on Clock LOW:
    //Serial.println("Simblee has the Bus");
    while(digitalRead(SQWPin)) {} // The Simblee will wait until the SQW pin goes low

    While the Arduino can only take the bus when Clock is HIGH.

    Does this address the issue you raised?

    Thanks,

    Chip

  • Arduino I2C Multi-Master Approach - Why and How 8 months ago

    Anton,
    Yes, you could use one line for both clock and busy. But, I am concerned about the edge case of two "masters" both taking control at the same time. I also wanted to make the code as simple as possible.

    To that end, one change I made from the example code in this article was to use the digitalWriteFast library to speed all the reads and writes.

    Thanks, Chip

Add projectSign up / Login