I try to understand the pin mapping of the Shield Shield.
My corresponding arduino sketch is operating on D5 (~), D8 and D9(~).
On the Shield Shield I tried different combinations, but my ported library can not read any values. So in first place I like to verify my pin mapping. I use a photon and electron for testing.
I tried the following mapping on the Shield Shield:
D5 (~), D7 and D9(~)
and in my Particle sketch I try to read the values in this myDMS.attach( D7 , D0 , A4 );
and in this way myDMS.attach( D5 , D7 , D9 );
What is the correct way?
Have you got a Shield Shield at hand?
On the top side of the board you see silk screen telling the Arduino style pin numbers and underneath the Particle pin names.
So Arduino ~5 (aka D5 (~)) maps to Particle D0, Arduino ~8 (aka D8) to Particle A5 and Arduino ~9 (aka D9 (~)) to Particle A4.
But that’s just what the pin mapping shows too, so I’m a bit puzzled how you were led to try the other pin combinations
If you got confused by the tilde (~
) next to the Arduino pin numbers, these should just indicate that the corresponding Photon/Electron pins are PWM capable. So the extra ~
next to 8
should not bother you - if your sketch doesn’t use PWM on that pin it won’t get in your way.
Thanks @ScruffR! I also tried this combination, but I was not sure to use D8 from the Shield Shield because it is a PWM-Pin (~).
Now I tried it again with myDMS.attach( A5 , D0 , A4 );
on Pin 5, 8 and 9, but I still get no correct values. Looks like I need to debug my ported ADS 1231 library.
@ScruffR It was a bug in my port of the arduino library. Now it seems to work (still ongoing test process): Library for ADS 1231 (bee hive weigh scale)
Thanks for your help!
1 Like