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. -
@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.
-
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 drop the call to uart.init(). It is not needed and will reset the pins to the default values.
-
@robert-hh Thanks a lot for the help. Now it works and I can continue.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register Login