- - PR -
初スレです。
1
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2004-05-25 15:44
iアプリで赤外線リモコンを作っています。
赤外線は発信しているようですが、データのビットパターンの指定方法がわかりません。 教えて下さい。 int freq = 38; // KHz int base = 500; // usec int length = 24; irremote = new IrRemoteControlFrame[1]; data = new byte[4]; if(w_component == imageButton){ data[0] = 1; data[1] = 2; data[2] = 3; data[3] = 4; irremote[0] = new IrRemoteControlFrame(); irremote[0].setFrameData( data, length ); irremote[0].setStartHighDuration( base * 8 ); irremote[0].setStartLowDuration( base * 4 ); irremote[0].setStopHighDuration( base * 1 ); irremote[0].setFrameDuration( length * base * 4 / 100 + 60 + 85 ); irremote[0].setRepeatCount( 1 ); IrRemoteControl irremote_con = IrRemoteControl.getIrRemoteControl(); irremote_con.setCarrier( 85, 170 ); irremote_con.setCode0( IrRemoteControl.PATTERN_HL, base * 1, base * 1 ); irremote_con.setCode1( IrRemoteControl.PATTERN_HL, base * 1, base * 3 ); irremote_con.send( 1, irremote, 1 ); 上記設定をすると、PortHackerでは、 ->30 5c 5c 1c 7d 30 5c 5c ->1c 7d 30 5c 5c 1c 7d 30 ->5c 5c 1c 7d 30 5c 5c 1c ->7d 30 5c 5c 1c 7d 30 5c ->5c 1c 7d 30 5c 5c 1c 7d ->30 5c 5c 1c 7d 30 5c 5c ->1c 7d 30 5c 5c 1c 7d 30 ->5c 5c 1c 7d 30 5c 5c 1c ->7d 30 5c 5c 1c 7d 30 5c ->5c 1c 7d 30 5c 5c 1c 7d と表示されます。 欲しい結果は ->60 6f 66 27 2a 6a 6f 7f です。 アドバイス下さい。 |
1