Arduino IR Transceiver Protocol
OzIRTransceiver is capable to encode and transmit as well as receive and decode different type of remote controller signals. An infrared LED needs to be wired to the microcontroller to transmit signals. To receive signals you should wire an infrared receiver, for example the 1838B. The most widely used application of this device is to read signals from the most popular remote controller brands.
Decoding protocols for receiving:
|
|
|
|
|
|
|
|
|
|
How to build a test circuit with a 1838B infrared IR receiver and an Arduino Mega?
Arduino codes are included.
I. 'Welcome' event from microcontroller
Example
//transmitter device is ready for use c=welcome&id=tsCbNw&type=OzIRTransceiver&pos=2&name=MyIRTransmitter_1&t=3 //receiver device is ready for use c=welcome&id=nDf25g&type=OzIRTransceiver&pos=3&name=MyIRReceiver_1&t=4
Parameters
Parameter | Type | Range | Functionality |
c | String | 'welcome' | Identifies the welcome message. |
id | String | 6 characters (numbers, uppercase and lowercase characters) | The ID of the device which is chosen by the microcontroller. |
type | String | 'OzIRTransceiver' | Determines the type of the device. |
pos | Byte | 0-255 | Determines the position of the device on the list of the ID manager of the microcontroller. Please make sure there are no other devices in the same position. |
name (optional) | String | e.g. 'MyIRTransmitter_1' | You can give default names for devices. |
t | Byte | 0-255 | Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
II. Commands to microcontroller
'send' command
(Only if you use it as a transmitter. It is not used in other cases.)
This command sends any keycode encoded by a selected protocol. If the protocol type is undefined it will use the last set protocol. The default protocol is Panasonic.
Example
c=send&type=samsung&value=0xe0e0a05f&id=tsCbNw&t=0
Parameters
Parameter | Type | Range | Functionality | ||
c | String | 'send' | Identifies the command. | ||
type (optional parameter) |
String | Supported protocol types:
|
The protocol to encode the outgoing signal. | ||
value | Unsigned Long Long | HEX e.g. : 0xf4d (sony, 12bit) 0xe0e0a05f (samsung, 32bit) 0xdbdbe0e0a05f (panasonic, 48bit) |
The keycode that needs to be transmitted. | ||
id | String | 6 characters (numbers, uppercase and lowercase characters) | The ID of the device which is chosen by the microcontroller. | ||
t | Byte | 0-255 | Counts the number of commands sent. Counts from 0 to 255 then from 0 again. |
Response to 'Send'
(Only if you use it as a transmitter. It is not used in other cases.)
After the microcontroller has transferred the infrared signal it will send this response to your computer.
Example
c=send_resp&type=samsung&value=0xe0e0a05f&id=tsCbNw&t=5
Parameter | Type | Range | Functionality | ||
c | String | "send_resp" | Identifies the response | ||
type | String | Supported protocol types:
( 'receiver' if the device is a receiver) |
The protocol of the outgoing signal. This parameter is always used. An 'error' is sent in the response if the type is not supported. Or 'receiver' is sent in the response if the device is a receiver. | ||
value | Unsigned Long Long | HEX e.g. : 0xf4d (sony, 12bit) 0xe0e0a05f (samsung, 32bit) 0xdbdbe0e0a05f (panasonic, 48bit) |
The keycode that was transmitted. An 'error' string is sent if the length of the HEX is not supported by the protocol. | ||
id | String | 6 characters (numbers, uppercase and lowercase characters) | The ID of the device which is chosen by the microcontroller. | ||
t | Byte | 0-255 | Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
III. Events from microcontroller
'received' event
(Only if you use it as a receiver. It is not used in other cases.)
This event is called every time a remote controller keycode is received by the infrared receiver. The IR needs to be connected to the microcontroller.
Example
c=received&type=samsung&value=0xe0e0a05f&id=nDf25g&t=6
Parameters
Parameter | Type | Range | Functionality | ||
c | String | 'received' | Identifies the event. | ||
type | String | Supported protocol types:
|
The protocol that has successfully decoded the incoming signal. The protocol names are always built from lowercase characters. | ||
value | Unsigned Long Long | HEX e.g. : 0xf4d (sony, 12 bit) 0xe0e0a05f (samsung, 32 bit) 0xdbdbe0e0a05f (panasonic, 48 bit) |
The keycode decoded from the currently received signal. | ||
id | String | 6 characters (numbers, uppercase and lowercase characters) | The ID of the device which is chosen by the microcontroller. | ||
t | Byte | 0-255 | Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
More information
- Protocole série de l'émetteur-récepteur RF 433 MHz
- Protocole série du joystick analogique
- Protocole série du capteur analogique
- Protocole série du bouton
- Protocole série du buzzer
- Protocole série du moteur DC
- Protocole série du capteur DHT
- Protocole série de l'EEPROM
- Protocole série du clavier
- Protocole série du capteur gyroscopique
- Protocole série du gestionnaire d'ID
- Protocole série de l'émetteur-récepteur IR
- Protocole série de l'écran LCD
- Protocole série du lecteur NFC
- Protocole série de la barrière optique
- Registre
- Protocole série de l'émetteur-récepteur RF24
- Protocole série de la LED RVB
- Protocole série du capteur RVB
- Protocole série de l'encodeur rotatif
- Protocole série du moteur servo
- Protocole série du compteur de pas
- Protocole série du moteur pas à pas
- Protocole série de l'interrupteur
- Protocole série du capteur de température
- Protocole série de la minuterie
- Protocole série du capteur ultrasonique
- Messages de bienvenue de l'imprimante 3D Ozeki