LowPowerLab Forum

Hardware support => Moteino => Topic started by: savan8192 on January 15, 2020, 07:23:11 PM

Title: Arduino IDE 1.8.10 Programming Error
Post by: savan8192 on January 15, 2020, 07:23:11 PM
I have a test sketch that used to work on Moteino + IMU. For some reason now when I re-upload them to Moteino it says it can't read the IMU. I have similar sketch uploaded to other Moteino and it is still working which proves there is no wiring/connection issue but if I re-upload the sketch it stops working. Can this be a problem with  Arduino Software (IDE) 1.8.10?? I am struggling to find the culprit causing this!
Title: Re: Arduino Programming Error
Post by: TomWS on January 15, 2020, 09:06:50 PM
Which "IMU" and what interface are you using (SPI or I2C)?
It matters because some IMUs 'support' both interfaces but, to keep the device from detecting the wrong interface certain signal lines (probably clock and CS) must be held at certain levels at power up.  I don't remember the specifics, but it is important and usually solved by adding a pullup resistor or two.

Net: Check the datasheet for the IMU and see what the requirements are and make sure they are met.
Title: Re: Arduino Programming Error
Post by: savan8192 on January 16, 2020, 04:20:22 AM
Hi Tom, thanks for the quick reply. Sorry I didn't provide the full details earlier. I am using LSM9DS1 (on Felix's breakout board https://lowpowerlab.com/shop/product/186 (https://lowpowerlab.com/shop/product/186)). To test I am using I2C, and I read on SparkFun's hook-up guide that resistors may not be necessary (https://learn.sparkfun.com/tutorials/lsm9ds1-breakout-hookup-guide/all (https://learn.sparkfun.com/tutorials/lsm9ds1-breakout-hookup-guide/all))

I have uploaded high res pictures here (https://siriusminerals-my.sharepoint.com/:f:/p/savan_vachhani/EnctcqQ7CjxPkvzYbz2G3UAByqlXARobO8dUJjFCFWTYtg?e=I62QBs) for you to look at my connection.

The Moteino with black aerial was programmed in 2019 and was working and still works.

The Moteino with yellow aerial is programmed recently and is not working any more despite the same connection and hence I have started to feel it's the way sketch is uploaded to them is causing the problem.
Title: Re: Arduino Programming Error
Post by: TomWS on January 16, 2020, 08:55:58 AM
Ok, the breakout board has the necessary connections to prevent the condition I was worried about.  The next question is whether you've swapped breakout boards between the two moteinos to confirm that the breakout boards are both ok?

If yes, then it could very well be the IDE.  I tend not to 'update' IDEs once I have one that works as the 'quality control' in IDEs is virtually non-existent and a new one is very likely to break a working one.  I call them the 'IDE du jour' as they need a new one practically every day.
Title: Re: Arduino Programming Error
Post by: Felix on January 16, 2020, 10:46:33 AM
FIY The IMUs were tested on IDE 1.8.7. It should be an easy download to test if the IDE is the problem.
I would remove the breadboard, if possible use shorter wires, and connect the Moteino+IMU directly.
Title: Re: Arduino Programming Error
Post by: savan8192 on January 16, 2020, 12:33:22 PM
Thank you Tom and Felix, IDE was the culprit, after all! I switched to 1.8.7 and happy days!

Title: Re: Arduino Programming Error
Post by: TomWS on January 16, 2020, 09:07:27 PM
Quote from: savan8192 on January 16, 2020, 12:33:22 PM
IDE was the culprit,
I'm Gobsmacked!  Stunned even!   :o
Great!  I'm glad yet another Arduino FU is solved!
The moral of the story?
Title: Re: Arduino IDE 1.8.10 Programming Error
Post by: savan8192 on January 17, 2020, 04:55:21 AM
Quote from: TomWS on January 16, 2020, 09:07:27 PM
The moral of the story?
- For me it is not to blindly trust IDE.

This is my first time when I experienced fault due to IDE.

Thanks for your replies!