I've connected SD card module to Arduino UNO
. I want to use PIN 10
for PWM DC motor control
and because of that, I've connected CS pin
directly to another pin (A3).
SD card is working properly, but after calling SD.begin(A3)
, it set PIN 10
to HIGH
!
Immediately after SD.begin(A3)
and set that pin to LOW
, but meanwhile the motor took a small rotation.
I've digged into SD.cpp
and Sd2Card.cpp
, but couldn't find where this problem occured!
Any help appreciated....
The Solution:
Simply call SD.begin(-1)
and it doesn't touch PIN10
. Hope helps somebody else!