Chat freely about anything...

User avatar
By Paul Stewart
#69222 Try SD SPI code and ADXL345 SPI code separately and each individual is fine. When merge the codes, ADXL345 reading is okay (not plug in MicroSD Adapter). Used HSPI pins and pin connections should be okay.

Every time MicroSD is plugged (the same pin working with above code), ADXL345 reading suddenly becomes 0g, 0g, 0g. Pull it out then reading is good.

See https://forum.arduino.cc/index.php?topic=360718.0 and not sure if this is due to a hardware defect on MicroSD Adapter.

Already read many posts like https://forum.sparkfun.com/viewtopic.php?f=14&t=38072 and the code produces 0g result, too.

This is the micro sd adatper that I used - https://www.amazon.com/gp/product/B01MS ... UTF8&psc=1

(1) Is it purely a catalex micro sd adapter hardware problem? Anyone suggest another one?
(2) Is it possible to another SPI pins in Nodemcu so ADXL345 can keep using HSPI?