// MUNTS-0018 Raspberry Pi Tutorial I/O Board I/O resource definitions // Copyright (C)2021-2023, Philip Munts dba Munts Technologies. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. using static IO.Objects.RemoteIO.Platforms.RaspberryPi; namespace IO.Objects.RemoteIO.Platforms { /// /// I/O resources (channel numbers) available from a /// /// MUNTS-0018 Tutorial I/O Board Remote I/O Protocol Server. /// /// /// The following device tree overlay commands must be added to /// config.txt on the Raspberry Pi hosting the MUNTS-0018 Tutorial /// I/O Board Remote I/O Protocol Server: /// /// dtoverlay=anyspi,spi0-1,dev="microchip,mcp3204",speed=1000000 /// dtoverlay=pwm-2chan,pin=12,func=4,pin2=19,func2=2 /// /// public static class MUNTS_0018 { /// /// GPIO channel number for the remote Raspberry Pi user LED. /// Cannot be configured as an input. /// public const int USERLED = 0; /// /// GPIO channel number for the on-board LED D1. /// Cannot be configured as an input. /// public const int D1 = GPIO26; /// /// GPIO channel number for the on-board momentary switch SW1. /// Cannot be configured as an output. /// /// /// This GPIO pin cannot be configured as an output. /// public const int SW1 = GPIO6; /// /// GPIO channel number for Grove Digital I/O Connector J4 pin /// D0. /// public const int J4D0 = GPIO23; /// /// GPIO channel number for Grove Digital I/O Connector J4 pin /// D1. /// public const int J4D1 = GPIO24; /// /// GPIO channel number for Grove Digital I/O Connector J5 pin /// D0. /// public const int J5D0 = GPIO5; /// /// GPIO channel number for Grove Digital I/O Connector J5 pin /// D1. /// public const int J5D1 = GPIO4; /// /// GPIO channel number for Grove DC Motor Driver Connector J6 /// pin D0. /// /// /// This GPIO channel is normally unusable because GPIO12 is /// mapped to PWM0. /// public const int J6D0 = GPIO12; /// /// GPIO channel number for Grove DC Motor Driver Connector J6 /// pin D1. /// public const int J6D1 = GPIO13; /// /// GPIO channel number for Grove DC Motor Driver Connector J7 /// pin D0. /// /// /// This GPIO channel is normally unusable because GPIO19 is /// mapped to PWM1. /// public const int J7D0 = GPIO19; /// /// GPIO channel number for Grove DC Motor Driver Connector J7 /// pin D1. /// public const int J7D1 = GPIO18; /// /// PWM channel number for Servo Header J2. /// public const int J2PWM = PWM0; /// /// PWM channel number for Servo Header J3. /// public const int J3PWM = PWM1; /// /// PWM channel number for DC Motor Driver Grove Connector J6 /// pin D0. /// /// /// J6PWM controls the motor speed. /// public const int J6PWM = PWM0; /// /// GPIO channel number for DC Motor Driver Grove Connector J6 /// pin D1. /// /// /// J6DIR controls the motor direction. /// public const int J6DIR = GPIO13; /// /// PWM channel number for Grove DC Motor Driver Connector J7 /// pin D0. /// /// /// J7PWM controls the motor speed. /// public const int J7PWM = PWM1; /// /// GPIO channel number for Grove DC Motor Driver Connector J7 /// pin D1. /// /// /// J7DIR controls the motor direction. /// public const int J7DIR = GPIO18; /// /// I2C bus channel number for Grove I2C Connector J9. /// public const int J9I2C = I2C1; /// /// Analog input channel number for Grove Analog Input Connector /// J10 pin A0 (MCP3204 input CH2). /// public const int J10A0 = 2; /// /// Analog input channel number for Grove Analog Input Connector /// J10 pin A1 (MCP3204 input CH3). /// public const int J10A1 = 3; /// /// Analog input channel number for Grove Analog Input Connector /// J11 pin A0 (MCP3204 input CH0). /// public const int J11A0 = 0; /// /// Analog input channel number for Grove Analog Input Connector /// J11 pin A1 (MCP3204 input CH1). /// public const int J11A1 = 1; } }