SD card wont initialize when connected to a Serial connection

  • Hello, I need some troubleshooting help.
    I am reading some instruments with the arduino and then sending the data through to my SiPy via UART. This all works well the problem comes when i want to save the data on the SD card mounted on the expansion board. I have noticed that whenever I disconnect the tx line(arduino) from the P4 pin (Sipy) the sd card functions work perfectly well. When the arduino is connected to the SiPy i get initialization problems on the Sipy. The Arduino and Sipy share a common ground. Thank you in advance

  • Robert, you are my hero! thank you so much.

  • @JackBasson P4, P8 and P23 are needed for the SD card. You should use another Pin but P4 for UART, for instance P3 and P9. UART pins can be almost arbitrarily assigned with the pins=(TX_PIN, RX_PIN) option of uart.init() or the constructor.
    So using:

    from machine import UART
    uart=UART(1, baudrate, pins=('P9', 'P10'))

    you assign TX to P9 and RX to P10.

Log in to reply

Pycom on Twitter