IO - OSC
[OSC]
Control any pin's direction and output from OSC.
More...
Control any pin's direction and output from OSC.
The IO system allows for the manual manipulation of individual signal lines on the Make Controller. Proceed with care if you're using these at the same time as any of the other subsystems, as most other subsystems rely on the IO system internally to maintain control of the appropriate signal lines.
There are 64 IO's on the Make Controller, numbered 0 - 63.
- IOs 0 - 31 correspond to PortA
- IOs 32 - 63 correspond to PortB.
Each IO has four properties:
- Output
- The output property sets whether the IO is an output. A value of 1 makes it an output, and a value of 0 makes it an input. For example, to make pin 4 an output, send a message like Send the message to make it an input.
- Pullup
- The pullup property determines whether a given IOs pullup resistor is enabled. To enable it on IO 2, send the message and to disable it, send the message
- Value
- Writing the value property sets the on/off value of a given IO. The IO system only permits digital IO so, we only want to send ones and zeros as values. For example, to activate pin 4, send a message like Change the argument 1 to a 0 to turn it off. Reading the value property returns the value of a given IO. For example, to read pin 4, send a message like
- Active
- The active property corresponds to the active state of an IO. Read whether IO 0 is active by sending the message You can set the active flag by sending