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
"comment": "This interface represents AnalogInput functionality, providing methods to obtain analog input readings and buffered samples.",
5
+
"methods": [
6
+
{
7
+
"name": "getVoltage",
8
+
"rtn": "float",
9
+
"arg": "void",
10
+
"comment": "Gets the analog input reading, as an absolute voltage in Volt units."
11
+
},
12
+
{
13
+
"name": "getVoltageSync",
14
+
"rtn": "float",
15
+
"arg": "void",
16
+
"comment": "This is very similar to getVoltage(), but will wait for a new sample to arrive before returning."
17
+
},
18
+
{
19
+
"name": "getReference",
20
+
"rtn": "float",
21
+
"arg": "void",
22
+
"comment": "Gets the maximum value against which read() values are scaled."
23
+
},
24
+
{
25
+
"name": "read",
26
+
"rtn": "float",
27
+
"arg": "void",
28
+
"comment": "Gets the analog input reading, as a scaled real value between 0 and 1."
29
+
},
30
+
{
31
+
"name": "readSync",
32
+
"rtn": "float",
33
+
"arg": "void",
34
+
"comment": "This is very similar to read(), but will wait for a new sample to arrive before returning."
35
+
},
36
+
{
37
+
"name": "setBuffer",
38
+
"rtn": "void",
39
+
"arg": "int",
40
+
"comment": "Initializes or destroys an internal buffer, used for queuing sampled data."
41
+
},
42
+
{
43
+
"name": "getOverflowCount",
44
+
"rtn": "int",
45
+
"arg": "void",
46
+
"comment": "Gets the number of samples that have been dropped as a result of overflow."
47
+
},
48
+
{
49
+
"name": "available",
50
+
"rtn": "int",
51
+
"arg": "void",
52
+
"comment": "Gets the number of samples currently in the buffer. Reading that many samples is guaranteed not to block."
53
+
},
54
+
{
55
+
"name": "readBuffered",
56
+
"rtn": "float",
57
+
"arg": "void",
58
+
"comment": "Read a sample from the internal buffer. This method will block until at least one sample is available."
59
+
},
60
+
{
61
+
"name": "getVoltageBuffered",
62
+
"rtn": "float",
63
+
"arg": "void",
64
+
"comment": "Read a sample from the internal buffer. This method will block until at least one sample is available."
65
+
},
66
+
{
67
+
"name": "getSampleRate",
68
+
"rtn": "float",
69
+
"arg": "void",
70
+
"comment": "Gets the sample rate used for obtaining buffered samples."
71
+
}
72
+
]
73
+
},
74
+
{
75
+
"name": "PulseInput",
76
+
"comment": "This interface represents PulseInput functionality, providing methods for pulse and frequency measurements.",
77
+
"methods": [
78
+
{
79
+
"name": "getDuration",
80
+
"rtn": "float",
81
+
"arg": "void",
82
+
"comment": "Gets the pulse duration in case of pulse measurement mode, or the period in case of frequency mode."
83
+
},
84
+
{
85
+
"name": "getDurationSync",
86
+
"rtn": "float",
87
+
"arg": "void",
88
+
"comment": "This is very similar to getDuration(), but will wait for a new sample to arrive before returning."
89
+
},
90
+
{
91
+
"name": "getDurationBuffered",
92
+
"rtn": "float",
93
+
"arg": "void",
94
+
"comment": "Reads a single measurement from the queue. If the queue is empty, will block until more data arrives."
95
+
},
96
+
{
97
+
"name": "waitPulseGetDuration",
98
+
"rtn": "float",
99
+
"arg": "void",
100
+
"comment": "@deprecated Please use getDurationBuffered() instead."
101
+
},
102
+
{
103
+
"name": "getFrequency",
104
+
"rtn": "float",
105
+
"arg": "void",
106
+
"comment": "Gets the momentary frequency of the measured signal. When scaling is used, this is compensated for here."
107
+
},
108
+
{
109
+
"name": "getFrequencySync",
110
+
"rtn": "float",
111
+
"arg": "void",
112
+
"comment": "This is very similar to getFrequency(), but will wait for a new sample to arrive before returning."
113
+
}
114
+
]
115
+
},
116
+
{
117
+
"name": "DigitalInput",
118
+
"comment": "This interface represents DigitalInput functionality, providing methods to read digital input pin values and wait for specific logical levels.",
119
+
"methods": [
120
+
{
121
+
"name": "read",
122
+
"rtn": "boolean",
123
+
"arg": "void",
124
+
"comment": "Read the value sensed on the pin. May block for a few milliseconds if called right after creation of the instance."
125
+
},
126
+
{
127
+
"name": "waitForValue",
128
+
"rtn": "void",
129
+
"arg": "boolean",
130
+
"comment": "Block until a desired logical level is sensed. The calling thread can be interrupted for aborting this operation."
131
+
}
132
+
]
133
+
},
134
+
{
135
+
"name": "CapSense",
136
+
"comment": "This interface represents the CapSense functionality, allowing capacitance readings and threshold-based operations.",
137
+
"methods": [
138
+
{
139
+
"name": "read",
140
+
"rtn": "float",
141
+
"arg": "void",
142
+
"comment": "Gets the capacitance reading. It typically takes a few milliseconds."
143
+
},
144
+
{
145
+
"name": "readSync",
146
+
"rtn": "float",
147
+
"arg": "void",
148
+
"comment": "This is very similar to read(), but will wait for a new sample to arrive before returning."
149
+
},
150
+
{
151
+
"name": "setFilterCoef",
152
+
"rtn": "void",
153
+
"arg": "float",
154
+
"comment": "Sets the low-pass filter coefficient. This coefficient is the typical time constant of the system."
155
+
},
156
+
{
157
+
"name": "waitOver",
158
+
"rtn": "void",
159
+
"arg": "float",
160
+
"comment": "Block until sensed capacitance becomes greater than a given threshold."
161
+
},
162
+
{
163
+
"name": "waitOverSync",
164
+
"rtn": "void",
165
+
"arg": "float",
166
+
"comment": "This is very similar to waitOver(float), but will wait for a new sample to arrive before returning."
167
+
},
168
+
{
169
+
"name": "waitUnder",
170
+
"rtn": "void",
171
+
"arg": "float",
172
+
"comment": "Block until sensed capacitance becomes less than a given threshold."
173
+
},
174
+
{
175
+
"name": "waitUnderSync",
176
+
"rtn": "void",
177
+
"arg": "float",
178
+
"comment": "This is very similar to waitUnder(float), but will wait for a new sample to arrive before returning."
179
+
}
180
+
]
181
+
},
182
+
{
183
+
"name": "DigitalOutput",
184
+
"comment": "A pin used for digital output. A digital output pin can be used to generate logic-level signals. DigitalOutput instances are obtained by calling IOIO#openDigitalOutput. The value of the pin is set by calling write. The instance is alive since its creation. If the connection with the IOIO drops at any point, the instance transitions to a disconnected state, in which every attempt to use the pin (except close()) will throw a ConnectionLostException. Whenever close() is invoked the instance may no longer be used. Any resources associated with it are freed and can be reused. Typical usage:",
185
+
"methods": [
186
+
{
187
+
"name": "write",
188
+
"rtn": "void",
189
+
"arg": "boolean",
190
+
"comment": "The output. true is logical \"HIGH\", false is logical \"LOW\"."
191
+
}
192
+
]
193
+
},
194
+
{
195
+
"name": "PwmOutput",
196
+
"comment": "A pin used for PWM (Pulse-Width Modulation) output. A PWM pin produces a logic-level PWM signal. These signals are typically used for simulating analog outputs for controlling the intensity of LEDs, the rotation speed of motors, etc. They are also frequently used for controlling hobby servo motors. PwmOutput instances are obtained by calling IOIO#openPwmOutput. When used for motors and LEDs, a frequency of several KHz is typically used, where there is a trade-off between switching power-loses and smoothness of operation. The pulse width is typically set by specifying the duty cycle, with the setDutyCycle method. A duty cycle of 0 is \"off\", a duty cycle of 1 is \"on\", and every intermediate value produces an intermediate intensity. Please note that any devices consuming more than 20mA of current (e.g. motors) should not by directly connected the the IOIO pins, but rather through an amplification circuit suited for the specific load. When used for hobby servos, the PWM signal is rather used for encoding of the desired angle the motor should go to. By standard, a 100Hz signal is used and the pulse width is varied between 1ms and 2ms (corresponding to both extremes of the shaft angle), using setPulseWidth. The instance is alive since its creation. If the connection with the IOIO drops at any point, the instance transitions to a disconnected state, in which every attempt to use the pin (except close()) will throw a ConnectionLostException. Whenever close() is invoked the instance may no longer be used. Any resources associated with it are freed and can be reused. Typical usage (fading LED):",
197
+
"methods": [
198
+
{
199
+
"name": "setDutyCycle",
200
+
"rtn": "void",
201
+
"arg": "float",
202
+
"comment": "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."
203
+
},
204
+
{
205
+
"name": "setPulseWidth",
206
+
"rtn": "void",
207
+
"arg": "float",
208
+
"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."
0 commit comments