我需要帮助构建一个“简单”的 arduino 代码来传输和接收 IR 信号。
我尝试了互联网上的几个代码,但没有一个适合我的 Logarex 电表。喜欢: http ://tunn.us/arduino/landisgyr.php https://github.com/prophetmaster/landisgyre350
通信由 IEC 62056-21 完成。我正在尝试向我的电表发送握手 0x2F, 0x3F, 0x21.0x0D, 0x0A 然后请求数据 0x06.0x30.0x35.0x30.0x0D, 0x0A 收入 不幸的是,我无法获得任何信息。通过红外发射器发送握手,然后请求数据,然后开始在红外接收器上接收数据是否容易?我是否需要以 300 波特率进行握手,然后在下一部分以 9600 通信并在 IR RX 中接收 9600?
The output should be something like this on an arduino serial monitor.
Baudrate: 300 bps, 7 bits, parity even, 1 stop bit
Send: /?!<CR><LF> (wake-up and sign-on)
Receive: /XXX5YYYYY<CR><LF> (XXX is the manufacturer ID; YYYYY is the meter ID; 5 is the new baudrate = 9600 bps)
Send: <ACK>050<CR><LF> (send ack; reading mode)
Baudrate: 9600 bps, 7 bits, parity even, 1 stop bit
Received: C.1(201236731.0(01:39 25-08-18)
1.8.1(0004398506*Wh)
1.8.2(0000000000*Wh)
1.8.3(0008198809*Wh)
1.8.4(0000000000*Wh)
1.8.5(0000000000*Wh)
1.8(0012597315*Wh)
2.8(0000000000*Wh)
!
D
谢谢大家的帮助,我是初学者,对IR没有经验。