This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
api:computer [2020/04/11 05:45] ocawesome101 [Computer API] add getDeviceInfo |
api:computer [2021/04/23 15:04] (current) heaven31415 [Computer API] Add information about the valid values of frequency for computer.beep() method |
||
---|---|---|---|
Line 54: | Line 54: | ||
The first returned result is the signal name, following results correspond to what was pushed in `pushSignal`, for example. These vary based on the event type. | The first returned result is the signal name, following results correspond to what was pushed in `pushSignal`, for example. These vary based on the event type. | ||
Generally it is more convenient to use `event.pull` from the [[api:event|event]] library. The return value is the very same, but the `event` library provides some more options. | Generally it is more convenient to use `event.pull` from the [[api:event|event]] library. The return value is the very same, but the `event` library provides some more options. | ||
+ | |||
- `computer.beep([frequency:string or number[, duration: number])` | - `computer.beep([frequency:string or number[, duration: number])` | ||
+ | |||
+ | if `frequency` is a number it value must be between 20 and 2000. | ||
Causes the computer to produce a beep sound at `frequency` Hz for `duration` seconds. This method is overloaded taking a single string parameter as a pattern of dots `.` and dashes `-` for short and long beeps respectively. | Causes the computer to produce a beep sound at `frequency` Hz for `duration` seconds. This method is overloaded taking a single string parameter as a pattern of dots `.` and dashes `-` for short and long beeps respectively. | ||
- | - `computer.beep([frequency:string or number[, duration: number])` | + | |
+ | - `computer.getDeviceInfo(): table` | ||
Returns a table of information about installed devices in the computer. | Returns a table of information about installed devices in the computer. |