chethan
we want to understand about GPIO funtions in raspberry pi
this is available in openplc documents

Mapping I/O tags to physical pins on the Pi
 
but in the code raspberrypi.cpp these pins are given

********************I/O PINS CONFIGURATION********************* * A good source for RaspberryPi I/O pins information is: * http://pinout.xyz * * The buffers below works as an internal mask, so that the * OpenPLC can access each pin sequentially **/ //inBufferPinMask: pin mask for each input, which //means what pin is mapped to that OpenPLC input\
int inBufferPinMask[MAX_INPUT] = { 8, 9, 7, 0, 2, 3, 12, 13, 14, 21, 22, 23, 24, 25 }; /
/outBufferPinMask: pin mask for each output, which //means what pin is mapped to that OpenPLC output int outBufferPinMask[MAX_OUTPUT] = { 15, 16, 4, 5, 6, 10, 11, 26, 27, 28, 29 };

why the pin numbers are different from the given documentation and the cpp files
Reply 0 0
thiagoralves
Documentation shows the header pin numbers where code must use WiringPi pin numbers. See the link on the code for more information: https://pinout.xyz/pinout/wiringpi
Reply 1 0
chethan
thank you that worked
Reply 0 0
Reply