Mesh Pin numbers compared to Photon or RPI3

Anyone made a chart comparing the pin numbers for the Mesh devices with the Photon or RPI3?

Here is what I have used in the past to make a photon .ino work for some of the pins of an RPI3

#if (PLATFORM_ID == 31)
// only compile following Raspberry PI stuff

if (pinNumberString == "D0"){pinNumber = 4;}    
if (pinNumberString == "D1"){pinNumber = 17;}    
if (pinNumberString == "D2"){pinNumber = 27;}    
if (pinNumberString == "D3"){pinNumber = 22;}    
if (pinNumberString == "D4"){pinNumber = 5;}     
if (pinNumberString == "D5"){pinNumber = 4;}     
if (pinNumberString == "D6"){pinNumber = 13;}    // PWM   
if (pinNumberString == "D7"){pinNumber = 19;}    // PWM   
if (pinNumberString == "A0"){pinNumber = 18;}    // PWM   
if (pinNumberString == "A1"){pinNumber = 23;}    
if (pinNumberString == "A2"){pinNumber = 24;}    
if (pinNumberString == "A3"){pinNumber = 25;}    
if (pinNumberString == "A4"){pinNumber = 12;}    // PWM (Working)
if (pinNumberString == "A5"){pinNumber = 16;}    // PWM (not working)   
if (pinNumberString == "A6"){pinNumber = 20;}    
if (pinNumberString == "A7"){pinNumber = 21;}    

#endif

The PIN diagram for the Argon is here

https://docs.particle.io/datasheets/wi-fi/argon-datasheet/#pinout-diagram

… a few minutes later…

looking at the above diagram closer. It does not look that difficult. In fact probably almost the same as the Photon. Cool

Anyone have any idea if this would work?

#if (PLATFORM_ID == 12)
// only compile following for the Argon Mesh Device (may work for the Boron or Xenon)

if (pinNumberString == "D0"){pinNumber = 0;}    
if (pinNumberString == "D1"){pinNumber = 1;}    
if (pinNumberString == "D2"){pinNumber = 2;}     // PWM
if (pinNumberString == "D3"){pinNumber = 3;}     // PWM
if (pinNumberString == "D4"){pinNumber = 4;}     // PWM 
if (pinNumberString == "D5"){pinNumber = 5;}     // PWM
if (pinNumberString == "D6"){pinNumber = 6;}     // PWM
if (pinNumberString == "D7"){pinNumber = 7;}     // PWM
if (pinNumberString == "A0"){pinNumber = 19;}    // PWM
if (pinNumberString == "A1"){pinNumber = 18;}    // PWM
if (pinNumberString == "A2"){pinNumber = 17;}    // PWM
if (pinNumberString == "A3"){pinNumber = 16;}    // PWM
if (pinNumberString == "A4"){pinNumber = 15;}    // PWM
if (pinNumberString == "A5"){pinNumber = 14;}    // PWM
if (pinNumberString == "A6"){pinNumber = 13;}    
if (pinNumberString == "A7"){pinNumber = 12;}    

#endif

I’d rather use this notation where applicable

  if (pinNumberString == "D0"){pinNumber = D0;}

And as always for this to work pinNumberString would need to be a String which I tend not to use :wink:

1 Like