The jeeio command
Synopsis
package require jeeiojeeio subcommand ?arg ...?
Description
The jeeio command lets you interact with MCP23008 based devices, like the jeelabs expander plug and output plug. The legal values of subcommand are listed below. Note that you can abbreviate the subcommands.
- jeeio expanderplug bus ?number?
- Open a channel to a jeelabs expander plug. There can be up to four expander plugs on the same i2c bus. The number argument selects which of the four devices to access. The command returns the channel handle.
- jeeio outputplug bus ?number?
- Open a channel to a jeelabs output plug. There can be a maximum of two output plugs on the same i2c bus. The number argument selects which of the two devices to access. The command returns the channel handle.
- jeeio invert handle value
- Invert the logic states for the ports corresponding to the bits in value.
- jeeio pullup handle value
- Enable weak pull-up for the input ports corresponding to the bits in value.
- jeeio readgpio handle
- Read the current state of all 8 gpio pins as a single byte.
- jeeio readpin handle pin
- Read the state of the specified gpio pin.
- jeeio setinput handle pin
- Configure the specified gpio pin as input.
- jeeio setoutput handle pin
- Configure the specified gpio pin as output.
- jeeio writeddr handle data
- Configure the function for all 8 gpio pins. Each bit in the data value matches a gpio pin. If the bit is 0, the corresponding pin is configured as output. If the bit is 1, the pin is configured as input.
- jeeio writegpio handle data
- Set the state of all output pins. The output pins are set low or high, depending on the value of the bit in the matching position in the data value. Bits matching input pins are ignored.
- jeeio writepin handle pin value
- Set the state of the specified output pin.