Wolfram Language & System 10.4 (2016)|Legacy Documentation
GPIO (General Purpose I/O)
This feature is not supported on the Wolfram Cloud.
- Configuration is not required for GPIO. Without configuration, any pin will automatically switch between input and output on read and write. Note that if a pin is used in a direction that is not intended, this may damage your system.
- Possible directions are , , and None.
- Setting the direction to None releases a pin if it has previously been configured.
- DeviceConfigure ignores requests to configure any pin that is being accessed by an asynchronous task.
- If an attempt is made to use a GPIO pin in a direction inconsistent with its configuration, an error will be generated.
sets the direction of pin n to be dir.
sets direction for pin .
- The value of a GPIO pin is always either 0 or 1.
- Note: By default, allows any pin to be used interchangeably in read and write mode. DeviceConfigure can be used to configure specific pins as read or write.
gives the value of GPIO pin p.
gives a list of the values of GPIO pins .