Infrared port management "IR".
We load and start the module to default 9600B.
- Note
- This module can only be used on models 1000 or FAT. This feature is used only once.
- Returns
- 1/0 Will be 1 if either charge, otherwise 0.
NIL ir.baud |
( |
NUMBER |
baud | ) |
|
Configure the port with the desired speed.
- Parameters
-
baud | It is the rate at which configure the port. |
- Note
- No predetermined speed, this is obtained, the device to which it is communicated.
- Returns
- Nothing.
It allows to know the status of the IR module.
- Returns
- true/false Depending on whether the module is started.
Receives an ascii character port.
- Returns
- A number from 0 to 255 ascii, character, or -1 if there is nothing in buffer.
NUMBER ir.put |
( |
NUMBER |
data | ) |
|
Send an ascii character to the port.
- Parameters
-
data | It is the ascii number to send. |
- Returns
- A number 1 if successful, 0 otherwise.
You receive a message via the port.
- Returns
- A string with the data received and a number indicating the amount of data, or nil if there is nothing in buffer.
NUMBER ir.write |
( |
STRING |
msg | ) |
|
Send a message via the port.
- Parameters
-
msg | is the string to send. |
- Returns
- A number indicating the amount of data sent successfully, or -1 on error.
Stops the module and close all port activity.
- Returns
- A number 1 if successful, 0 otherwise.