Tip |
---|
Cette page présente les constantes symboliques définies dans CrcLib en utilisant la directive du prepré-processeur |
Broches
Les broches du CrcDuino sont accessibles en utilisant les constantes symboliques suivantes. Elles sont déjà définies par CrcLib en utilisant des directives au pré-processeur #define
, qui permettent aux programmeurs de donner des noms explicites à certaines portion de leur code.
Tip |
---|
For more information about the hardware aspect of the I/O pins, refer to the CrcDuino Hardware Details page. |
Info |
---|
We encourage programmers to use their own
In these cases, whenever |
Digital Pins
These pins read or outputs digital signals.
CRC_DIG_1
CRC_DIG_2
CRC_DIG_3
CRC_DIG_4
CRC_DIG_5
CRC_DIG_6
CRC_DIG_7
CRC_DIG_8
CRC_DIG_9
CRC_DIG_10
CRC_DIG_11
CRC_DIG_12
The numbers for the pins match the one written on the board.
These pins are used with the SetDigitalPinMode()
, GetDigitalInput()
or SetDigitalOutput()
CrcLib function.
PWM Pins
These pins output Servo type PWM signals.
CRC_PWM_1
CRC_PWM_2
CRC_PWM_3
CRC_PWM_4
CRC_PWM_5
CRC_PWM_6
CRC_PWM_7
CRC_PWM_8
CRC_PWM_9
CRC_PWM_10
CRC_PWM_11
CRC_PWM_12
The numbers for the pins match the one written on the board.
These pins are used with the InitializePwmOutput()
, SetPwmOutput()
, MoveTank()
, MoveArcade()
or MoveHolomonic()
CrcLib function.
Analog Pins
These pins read and quantify analog voltage signals.
CRC_ANA_1
CRC_ANA_2
CRC_ANA_3
CRC_ANA_4
The numbers for the pins match the one written on the board.
These pins are used with the GetAnalogInput()
CrcLib function.
Communication Pins
These pins are used to communicate with the outside world using various communication protocols.
Note |
---|
No CrcLib functions are wrote to be used with the communication pins. Their pinMode() are not set by |
SPI Port
CRC_SPI_MISO
CRC_SPI_MOSI
CRC_SPI_SCK
CRC_SPI_SS
These pins can be used with the Arduino standard SPI library.
I2C Port
CRC_I2C_SDA
(physically aligned w/ the “MISO” mark)CRC_I2C_SCL
(physically aligned w/ the “MOSI” mark)
These pins can be used with the Arduino standard Wire library for I2C networking.
SERIAL Port
CRC_SERIAL_TXD1
(physically aligned w/ the “MISO” mark)CRC_SERIAL_RXD1
(physically aligned w/ the “MOSI” mark)
These pins can be used with the native Arduino Serial communication functions.
Info |
---|
I2C and Serial pins are interrupt pins, so they instead could be used to monitor additional encoders instead of managing I2C or Serial communication, or used for any other task requiring interrupt input capability. They would then must be first set as |
Encoder Pins
These pins are meant to be used to read digital signals coming from a quadrature encoder.
Note |
---|
These pins are set as |
ENCO Port
CRC_ENCO_A
(physically aligned w/ the “MISO” mark)CRC_ENCO_B
(physically aligned w/ the “MOSI” mark)
Info |
---|
These pins are interrupt pins, so they could be used for any other task requiring interrupt input capability instead of reading quadrature encoder data. |
Physically inaccessible pins
CRC_LM35D
: Reserved for receiving temperature data from the board temperature sensor, if installed. Most CrcDuino boards don't have a LM35D temperature sensor installed. If there's no component soldered in the 3 holes right below the 0270 inscription next to the buzzer, it means your board is not equipped with a temperature sensor.CRC_VBATT
: Reserved for reading the board power source voltage. It's highly recommended to use the GetBatteryVoltage() function instead of directly reading from this pin using the native Arduino function digitalRead().
Articles liés
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|