I am a little confused with the F_TX and F_RX pins on the Notecarrier F. The Datasheet seems to indicate that these pins are not dedicated and that there is a dip switch to control this. I dont see any reference to this nor do I see the dip switch ?
On the Notecarrier-AF I am using the RX and TX pins for my application without any issues. Can I expect the same behaviour with F_RX and F_TX ?
The DIP switch related to the RX/TX pins is the switch labelled DFU (near the Notecard socket). It comes from the factory in the ON position. However, if you move the switch into the OFF position, then your application will have access the RX/TX pins.
I believe you are understanding correctly. The F_TX and F_RX pins of the Feather are available when the DFU switch is disabled (not ON). In this case, they maybe be used to communicate with any UART based device, including the Notecard.
The N_TX and N_RX pins of the Notecard are available on the other side of the GPIO rail, and you can connect them together with jumper wires. The Feather and Notecard UART are NOT connected via the Notecarrier-F, because that would disallow them from being used by external peripherals.
A UART is a dedicated stream between two devices, while I2C is a bus that can accommodate several devices. For this reason, we chose to automatically connect both the Feather and the Notecard to the I2C bus. Connecting them to I2C will not preclude other devices from joining the I2C bus, whereas connecting the UARTs would not allow for other devices to connect.
I’m not using UART for anything else. All my devices are connected via I2C, or via a digital pin (temp sensors). So, I can move the DIP switch to OFF and thereby enable a wiring connection between the Notecard and Swan in order to use the UART stream.
Sorry if this should be in a separate topic, but one last question: is there a ready-made example of the code one would use to send sensor data via UART to Notecard (vs I2C)? I’m assuming the code to build the JSON body is the same, and the difference will simply be the setup for UART, i.e., Serial1.begin instead of Notecard.begin? But I’m not sure what replaces notecard.sendRequest(req); when using UART?
No need to be sorry, it is fine to post here. That being said, it would probably have been better in it’s own topic, because it makes it easier for others with the same question to find it.
You have a very good intuition about the Notecard! You are correct about how you should enable UART communication in hardware, and your guess at firmware was on the nose.
The README for the note-arduino library has a small section about configuring UART. If you would like a full example, then you can check any of our ready made examples, because they all support both I2C and UART based on a #define. If you look at Example #1, you can uncomment this line and follow the code to see how it’s enabling UART communications.