Raspberry
Functions
Has Gpio
Checks if the system has GPIO capabilities.
Return Type: Boolean
Signatures:
Raspi Cleanup
This function should be called when you are finished using the GPIO library. It sets all pin modes to INPUT and values to LOW.
Signatures:
Raspi Get Mode
This function retrieves the mode of the specified pin.
Parameters:
Name | Type | Description |
---|---|---|
pin | Pins | The pin to get the mode for. |
Return Type: Pin Modes
Signatures:
Raspi Init
This function initializes the GPIO library for use. It should be called before any other GPIO functions.
Signatures:
Raspi Read
This function reads the value from the specified pin.
Parameters:
Name | Type | Description |
---|---|---|
pin | Pins | The pin to read the value from. |
Return Type: Pin Values
Signatures:
Raspi Set Mode
This function sets the mode of the specified pin to the specified mode.
Parameters:
Name | Type | Description |
---|---|---|
pin | Pins | The pin to set the mode for. |
mode | Pin Modes | The mode to set for the pin. |
Signatures:
Raspi Set Pull Up Down
This function sets the pull-up/down mode for the specified pin.
Parameters:
Name | Type | Description |
---|---|---|
pin | Pins | The pin to set the pull up/down mode for. |
pud | Pull Up Down | The pull up/down mode to set for the pin. |
Signatures:
Raspi Set Pwm Dutycycle
This function sets the PWM duty cycle for the specified pin.
Parameters:
Name | Type | Description |
---|---|---|
pin | Pins | The pin to set the PWM duty cycle for. |
dutycycle | Integer | The PWM duty cycle to set for the pin. |
Signatures:
Raspi Set Pwm Frequency
This function sets the PWM frequency for the specified pin.
Parameters:
Name | Type | Description |
---|---|---|
pin | Pins | The pin to set the PWM frequency for. |
frequency | Integer | The PWM frequency to set for the pin. |
Signatures:
Raspi Set Pwm Range
This function sets the PWM range for the specified pin.
Parameters:
Name | Type | Description |
---|---|---|
pin | Pins | The pin to set the PWM range for. |
range | Integer | The PWM range to set for the pin. |
Signatures:
Raspi Write
This function writes the specified value to the specified pin.
Parameters:
Name | Type | Description |
---|---|---|
pin | Pins | The pin to write the value to. |
value | Pin Values | The value to write to the pin. |
Signatures: