You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This interface provides control over all the IOIO board functions.
8
+
7
9
| Name | Description |
8
10
|---------|---------------|
9
-
|void ioio.beginBatch()|Start a batch of operations. This is strictly an optimization and will not change functionality|
10
-
|void ioio.disconnect()|Closes the connection to the board, or aborts a connection process started with waitForConnect()|
11
-
|void ioio.endBatch()|End a batch of operations.|
12
-
|void ioio.hardReset()|Equivalent to disconnecting and reconnecting the board power supply.|
13
-
|void ioio.softReset()|Resets the entire state (returning to initial state), without dropping the connection.|
14
-
|void ioio.sync()|Sends a message to the IOIO and waits for an echo.|
15
-
|void ioio.waitForConnect()|Establishes connection with the IOIO board.|
16
-
|void ioio.waitForDisconnect()|Blocks until IOIO has been disconnected and all connection-related resources have been freed so that a new connection can be attempted.|
11
+
|void beginBatch(void)|Start a batch of operations. This is strictly an optimization and will not change functionality.|
12
+
|void disconnect(void)|Closes the connection to the board, or aborts a connection process started with waitForConnect().|
13
+
|void endBatch(void)|End a batch of operations.|
14
+
|void hardReset(void)|Equivalent to disconnecting and reconnecting the board power supply.|
15
+
|void softReset(void)|Resets the entire state (returning to initial state), without dropping the connection.|
16
+
|void sync(void)|Sends a message to the IOIO and waits for an echo.|
17
+
|void waitForConnect(int)|Establishes connection with the IOIO board.|
18
+
|void waitForDisconnect(void)|Blocks until IOIO has been disconnected and all connection-related resources have been freed, so that a new connection can be attempted.|
17
19
18
20
## AnalogInput
19
21
@@ -96,3 +98,12 @@ A pin used for PWM (Pulse-Width Modulation) output. A PWM pin produces a logic-l
96
98
|void setDutyCycle(float)|Sets the duty cycle of the PWM output. The duty cycle is defined to be the pulse width divided by the total cycle period. For absolute control of the pulse with, consider using setPulseWidth.|
97
99
|void setPulseWidth(float)|Sets the pulse width of the PWM output. The pulse width is duration of the high-time within a single period of the signal. For relative control of the pulse with, consider using setDutyCycle.|
98
100
101
+
## TwiMaster
102
+
103
+
An interface for controlling a TWI module, in TWI bus-master mode, enabling communication with multiple TWI-enabled slave modules.
Copy file name to clipboardExpand all lines: ioio/api.json
+52Lines changed: 52 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,51 @@
1
1
[
2
+
{
3
+
"name": "IOIO":
4
+
"comment": "This interface provides control over all the IOIO board functions.",
5
+
"methods": [
6
+
{
7
+
"name": "beginBatch"
8
+
"rtn": "void",
9
+
"arg": "void",
10
+
"comment" : "Start a batch of operations. This is strictly an optimization and will not change functionality."
11
+
},{
12
+
"name": "disconnect"
13
+
"rtn": "void",
14
+
"arg": "void",
15
+
"comment" : "Closes the connection to the board, or aborts a connection process started with waitForConnect()."
16
+
},{
17
+
"name": "endBatch"
18
+
"rtn": "void",
19
+
"arg": "void",
20
+
"comment" : "End a batch of operations."
21
+
},{
22
+
"name": "hardReset"
23
+
"rtn": "void",
24
+
"arg": "void",
25
+
"comment" : "Equivalent to disconnecting and reconnecting the board power supply."
26
+
},{
27
+
"name": "softReset"
28
+
"rtn": "void",
29
+
"arg": "void",
30
+
"comment" : "Resets the entire state (returning to initial state), without dropping the connection."
31
+
},{
32
+
"name": "sync"
33
+
"rtn": "void",
34
+
"arg": "void",
35
+
"comment" : "Sends a message to the IOIO and waits for an echo."
36
+
},{
37
+
"name": "waitForConnect"
38
+
"rtn": "void",
39
+
"arg": "int",
40
+
"comment": "Establishes connection with the IOIO board."
41
+
},{
42
+
"name": "waitForDisconnect"
43
+
"rtn": "void",
44
+
"arg": "void",
45
+
"comment" : "Blocks until IOIO has been disconnected and all connection-related resources have been freed, so that a new connection can be attempted."
46
+
}
47
+
]
48
+
},
2
49
{
3
50
"name": "AnalogInput",
4
51
"comment": "This interface represents AnalogInput functionality, providing methods to obtain analog input readings and buffered samples.",
@@ -196,5 +243,10 @@
196
243
"comment": "Sets the pulse width of the PWM output. The pulse width is duration of the high-time within a single period of the signal. For relative control of the pulse with, consider using setDutyCycle."
197
244
}
198
245
]
246
+
},
247
+
{
248
+
"name": "TwiMaster":
249
+
"comment": "An interface for controlling a TWI module, in TWI bus-master mode, enabling communication with multiple TWI-enabled slave modules.",
0 commit comments