AdaFruit M0 etc

i2c Pull up Resistor

Ask QuestionAsked todayActive todayViewed 46 times1

I try to run an accelerometer (Data sheet) with this library (link). Bus: I2C and Microcontroller adafruit-feather-m0-adalogger (link) is used.

If I wire the accelerometer to the muhC, I just get zeros for the acceleration values, but reasonable values for temperature. So I think that pull up resitors are needed. Correct?

I checked the data sheet of the accelerometer (page 103) for more information. But I still don’t know which resistors to use. Could you help me?



arduinoi2cpullupshareedit  follow  flagedited 4 hours agoasked 4 hours agoLorenzooo2555 bronze badges

  • I am familiar with Raspberry Pi I2C devices, but not with AdaFruit M0, but I think the pull up resistors for both cases should be almost the same, as summarized below: (1) Usually an I2C device module has its own pullup resistor, typically 4k7 or 10k. (2) If you are putting too many I2C devices on the same bus, you might get Error #121 – IO Error, then you need to remove some of the devices’ on board pullups, to reduce the total capacitance which has a limit of about 400uF. If you have say less than 3 I2C devices on the same bus, then it should be OK. / to continue, … – tlfong01 3 hours ago   
  • Now coming back to your getting accelero zero values. (1) If the temperature reading are reasonable, then the I2C communication should be OK. In other words, pullups have a wide, generous, forgiving,range and should be working properly. There is no need to make any pull up adjustments. (2) Is is common for newbies to get zero or weird accelero readings, usually because improper config. I am using ADXL345 accelero for Rpi and so far so good. – tlfong01 3 hours ago   
  • I don’t remember AdaFruit recommending the accelero you are using. Can you give me the link to the AdaFruit tutorial? – tlfong01 3 hours ago   
  • 1ok, thanks! Then I will check the configuration. @tlfong01 There’s no tutorial for this acc. You think it won’t work? – Lorenzooo 3 hours ago
  • Well, M0 uses CircuitPython. Are you sure your accelero is in the AdaFruit M0 Circuit Python library’s compatibility list? – tlfong01 3 hours ago   
  • I check the Seeestudio Adruino Library you are using uses C++. As I said, M0 speaks Circuit Python. So it is C++ directly talking with python is mission impossible. – tlfong01 3 hours ago   
  • 1@tlfong01 Again, thanks for your response! I’m using the Feather M0 with arduino IDE link – Lorenzooo 2 hours ago
  • 1@tlfong01 this would be possible even if curcuitpython were used, one can always perform the I2C operations directly. Your comments here are not particularly accurate. While some of the Adafruit M0 products may be able to run circuitpython it is neither their original nor primary purpose. It is also extensible. – Chris Stratton 52 mins ago 
  • 1As the accelerometer is SPI/I2C dual capable and the board supports multiple addresses you need to make sure it is configured for I2C and that the code is using the address in effect. Is your code appropriate to this accelerometer? – Chris Stratton 46 mins ago 
  • @Chris Stratton, Thanks a lot for your comments. I must first confess that I have never used AdaFruit M0 or CircuitPython. My knowledge about AdaFruit might be a couple of years out of date. If I remember correctly, AdaFruit introduced M0, they at the same time recommended Circuit Python as the original and primary purpose for newbie hardware and software development. Since that time, they sadly discontinued their support for Arduino and C++, though they still use Arduino IDE beside the Mu editor. I know it is confusing. Let me check out AdaFruit now to update my M0 and Cctt Python knowledge. – tlfong01 28 mins ago   
  • 1@tlfong01 stop posting such uninformed falsehoods! Adafruit has most definitely NOT discontinued Arduino support. It does not really seem that you have much knowledge to contribute to the question here. – Chris Stratton 23 mins ago 
  • My apologies for my possibly uninformed fake remarks. Perhaps allow me to go over Adafruit’s strategy and policy and I see if I misunderstood something important. I will apologize if I find my remarks are wrong and misleading. Thank you again for pointing out my ignorance about AdaFruit. I have always been a huge fan of AdaFruit and SparkFun, and I do have high respect on them. – tlfong01 15 mins ago   
  • First, an apology on my inaccurate and misleading remark about AdaFruit’s discontinued technical support on Arduino for some, but not all of their products. Second, another apology on my out of date remark about M0. As I said earlier, my M0 knowledge is a couple of years out of date. (1) “Adafruit Feather M0 Express – Designed for CircuitPython – Product sheet and Youtube video – US$20, AdaFruit 2017”: adafruit.com/product/3403. Have a great weekend. Cheers. – tlfong01 1 min ago   Edit   

Please avoid extended discussions in comments. Would you like to automatically move this discussion to chat?add a comment

1 Answer


If you look at the schematics of the module, it already has 4k7 pull-ups to 3.3V.

So it does not need any external pull-ups.

And don’t know what “5V or 3.3V” means in your picture, as the module works only on 3.3V and 5V will damage it.

Most likely the library does not initialize the chip correctly or the I2C address is wrong.shareedit  follow  flag answered 3 hours agoJustme28.1k22 gold badges2525 silver badges5151 bronze badges

  • Thanks! Yes, you’re right. I should have written “3.3V” instead of “5V or 3.3V”. – Lorenzooo 3 hours ago
  • How to I get to know the correct I2C adress? – Lorenzooo 2 hours ago
  • By reading the user manual of the module you have, or the chip datasheet. If the temperature sensing part and accelerometer are used via the same I2C address, then the address is correct. Some chips may use multiple I2C addresses, but I do not know if this chip does. – Justme 1 hour ago 

add a comment


Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.