UART and SD communication conflicts - fipy board



  • Hello there,

    I have a fipy module that is communicating through UART with a sensor and it is storing/uploading the data on the pybytes server.

    Now, I would like to save the data into an SD (which is connected to the available slot in the ExpansionBoard V3.1) in case the pybytes connection is not established, and upload the data once connection is restored.

    I am aware that the pin "P4" is the Rx line for the UART communication, and that it is also used to control the CMD of the SD card.

    I have tried to change the Rx line to other pins, but the communication is still conflicting. It seems that the device doesn´t care if I try to configure another pin as Rx. I have tried to change the Rx pin also without the SD feature but the module does the same.

    Any advice or solution will be immensely appreciated.

    Best wishes,
    Moises.



  • @robert-hh Thanks a lot for the help. Now it works and I can continue.



  • @GarciaMoises drop the call to uart.init(). It is not needed and will reset the pins to the default values.



  • Hello @robert-hh I have the initial code as follows:

    uart = UART(1, baudrate=9600, pins=('P3','P11'))
    uart.init(9600, bits=8, parity=None, stop=1)



  • @GarciaMoises can you show the code lines you use to set up the UART? Note that should all parameters for the UART, e.g. speed and pin configuration in one init call or in the constructor call. A call for uart.init() which just sets the speed resets the default pins.


Log in to reply
 

Pycom on Twitter