I want to automatically switch some digital input pins depending on if my code is running on a Boron or Electron. So I would like to find out, in the code, if the code is running on a Boron or an Electron. Is there a command for that?
You can use the
PLATFORM_ID macro which will tell you for which platform the code is running
You can also check for specific features, like Wi-Fi or Cellular, for example.