You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: Currently, I have to hard-code which Teensy pin # is being used by the nRF unit to communicate the "isConnected" state.
Option 1: Since I need to know the Teensy pin number, and since the Teensy pin number is defined by the Tympan hardware design, this piece of information would normally be placed in the TympanPins class for the RevF variant.
Option 2: The Tympan RevF has many GPIO lines connecting between the Teensy and the nRF52840 bluetooth module. It's the nRF firmware that (currently, V0.2.4) chooses which of these pins is used to convey the isConnected() state. Since it is set by the nRF firmware, it seems like the Teensy ought to be able to query the nRF to ask it which pin to use. The nRF would then tell the Teensy which of its pins to use to read isConnected().
Option 3: Clearly, both the Tympan hardware design and the nRF firmware affect which Teensy pin is being used. Therefore, the most robust, general solution would be for the nRF firmware to report some sort of name for the connection that it has selected for conveying isConnected(). Then, the TympanPins class would hold a mapping between all of the GPIO names and the Teensy pin #. This is a lot of work, though, with lots of options for failing.
Because of the risk of introducing more problems than I'm fixing, I think that I will not start with Option 3 and simply stick with Option 2.
The text was updated successfully, but these errors were encountered:
Interesting problem. I would offer another option
Option 4: The Tympan RefF can tell the nRF radio which pin to use for isConnected. This would give the most control over the pins, I think?
Problem: Currently, I have to hard-code which Teensy pin # is being used by the nRF unit to communicate the "isConnected" state.
Option 1: Since I need to know the Teensy pin number, and since the Teensy pin number is defined by the Tympan hardware design, this piece of information would normally be placed in the TympanPins class for the RevF variant.
Option 2: The Tympan RevF has many GPIO lines connecting between the Teensy and the nRF52840 bluetooth module. It's the nRF firmware that (currently, V0.2.4) chooses which of these pins is used to convey the isConnected() state. Since it is set by the nRF firmware, it seems like the Teensy ought to be able to query the nRF to ask it which pin to use. The nRF would then tell the Teensy which of its pins to use to read isConnected().
Option 3: Clearly, both the Tympan hardware design and the nRF firmware affect which Teensy pin is being used. Therefore, the most robust, general solution would be for the nRF firmware to report some sort of name for the connection that it has selected for conveying isConnected(). Then, the TympanPins class would hold a mapping between all of the GPIO names and the Teensy pin #. This is a lot of work, though, with lots of options for failing.
Because of the risk of introducing more problems than I'm fixing, I think that I will not start with Option 3 and simply stick with Option 2.
The text was updated successfully, but these errors were encountered: