Subscribe via RSS
8Jan/190

B&O BeoVision MX 7000 Homebrew Remote

After picking this TV up off the footpath, I found it to be a little tedious without a remote. A quick google saw that it needs a specific B&O remote and not just any universal contraption. From here, I managed to use my PC's serial port and WinLIRC to control the TV, albeit rudimentally. The MSX, whilst over SCART, wasn't displaying a proper picture, so I knew I needed a proper remote to flick through the settings quickly.

Arduino as a remote translator

I found a neat little Arduino Remote at Jaycar and decided on the spot that I'd use an Arduino to translate its buttons to those of the TV. This would require an IR Receiver and an IR Transmitter. I know the B&O tranmission needs to be fast, but the receiver can be anything off-the-shelf as long as it works with this remote below!

DSC06318

Thanks to Sparkfun's great IR tutorial, the build of the actual circuit was very simple. Two modules and a resistor! Make sure you point them in different directions so as to prevent one remote from interfering with the other.

DSC06336

Ken Shirrif's IRRemote Library is the only code library needed to get up and running. I then started searching for help on timings... It turns out that someone else has already requested this functionality but there's no confirmed results. Fortunately, there's a few good hints towards the bottom regarding transmission signal timing. Supposedly the library can be tuned to just output the data at the right frequency... so... let's try! We do get another hint here about setting the right timing, but with a warning that the timing might not be 100%. It seems that the unit can deal with a 10khz difference.

Anyway... I was going to go long-winded with a simple chunk of code to just send a power-on, then a chunk to receive the data from the cheap remote, then a bridge to bring it all together... but instead, here's the answer.

#include <IRremote.h>

#define TV_ON 0
#define DVD_ON 1
#define TV_SAT_DVD_GO 2
#define ARROW_UP 3
#define ARROW_DOWN 4
#define ARROW_LEFT 5
#define ARROW_RIGHT 6
#define TV_MENU 7
#define VOL_UP 8
#define VOL_DOWN 9
#define KEY_ZERO 10
#define KEY_ONE 11
#define TAPE_ON 12
#define ALL_OFF 13
#define CHAN_DOWN 14
#define SAT_ON 15
#define V_AUX 16

//now for the button data, each is 2 bytes, but only the second is used, 
//to use the indexes above to store the second bytes in a 8-bit padded array.

unsigned int button_bytes[] = {
  200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, //TV_ON
  200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, //DVD_ON
  200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, //TV_SAT_DVD_GO
  200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, //ARROW_UP
  200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 6250, //ARROW_DOWN
  200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, //ARROW_LEFT
  200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 6250, //ARROW_RIGHT
  200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 6250, //TV_MENU
  200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, //VOL_UP
  200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 6250, //VOL_DOWN
  200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, //KEY_ZERO
  200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, //KEY_ONE
  200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, //TAPE_ON
  200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, //ALL_OFF
  200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, //CHAN_DOWN
  200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, //SAT_ON
  200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, //V_AUX
};

//the following list are the full button suite... I need to update and repair this code... the first 8 bits don't always match above!
unsigned int beo4_tv_left[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_tv_right[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_up[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_tv_down[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_green[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 2800, 200, 9375, 200, 12500, 200};
unsigned int beo4_tv_yellow[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_red[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_tv_blue[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_exit[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_menu[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_stop[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_tv_0[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_1[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_tv_2[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_tv_3[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_4[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_5[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 12500, 200};
unsigned int beo4_tv_6[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_tv_7[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_8[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_tv_9[] = 				{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 12500, 200};

unsigned int beo4_video_vol_up[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_video_vol_down[] = 	{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_video_record[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 12500, 200};

unsigned int beo4_tv_on[] = 		 	{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_dvd_on[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_sat_on[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_cd_on[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_text_on[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_atape_on[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_radio_on[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_vtape_on[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 2800, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 12500, 200};

unsigned int beo4_audio_poweroff[] = 	{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_video_poweroff[] = 	{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_all_power_off[] = 	{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 12500, 200};

unsigned int beo4_tv_sat_dvd_go[] = 	{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 12500, 200, 

unsigned int beo4_vtape_left[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_vtape_right[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 2800, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_up[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_vtape_down[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_green[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 2800, 200, 9375, 200, 12500, 200};
unsigned int beo4_vtape_yellow[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_red[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_vtape_blue[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_exit[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 2800, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6200, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_menu[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_stop[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 2800, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 2800, 200, 12500, 200};
unsigned int beo4_vtape_0[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_1[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 2800, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_vtape_2[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 2800, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_vtape_3[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_4[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 2800, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_5[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 2800, 200, 9375, 200, 12500, 200};
unsigned int beo4_vtape_6[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_vtape_7[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_8[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_vtape_9[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 12500, 200};

unsigned int beo4_light_on[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_left[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_light_right[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_up[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_light_down[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_green[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 12500, 200};
unsigned int beo4_light_yellow[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_red[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_light_blue[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_menu[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_stop[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_light_0[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_1[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_light_2[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_light_3[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6350, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_4[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_5[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 12500, 200};
unsigned int beo4_light_6[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_light_7[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_8[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_light_9[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 12500, 200};

unsigned int beo4_audio_left[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_audio_right[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_up[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_audio_down[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_green[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 12500, 200};
unsigned int beo4_audio_yellow[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_red[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_audio_blue[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_menu[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_stop[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_audio_record[] =		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_0[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_1[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_audio_2[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 12500, 200};
unsigned int beo4_audio_3[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_4[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_5[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 12500, 200};
unsigned int beo4_audio_6[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 3125, 200, 12500, 200};
unsigned int beo4_audio_7[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_8[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_9[] = 			{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 9375, 200, 12500, 200};
unsigned int beo4_audio_exit[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_vol_up[] = 		{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 12500, 200};
unsigned int beo4_audio_vol_down[] = 	{200, 3125, 200, 3125, 200, 15625, 200, 3125, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 9375, 200, 3125, 200, 9375, 200, 6250, 200, 3125, 200, 6250, 200, 9375, 200, 3125, 200, 6250, 200, 12500, 200};

int RECV_PIN = 9;
int khz = 455; 
IRrecv irrecv(RECV_PIN);
decode_results results;
IRsend irsend;

unsigned int irHeader[] = {
  200, 3125, 200, 3125, 200, 15625, 200, 3125, //4 start bits
  200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250, 200, 6250 // 8 0 data bits
};
unsigned int irFooter[] = {200, 12500, 250};

void setup()
{  
  Serial.begin(9600);
  Serial.print("Enabling IRin...");
  irrecv.enableIRIn();
  Serial.println("Done");
}

void sendCommand(int cmd)
{
  irsend.sendRaw(irHeader, sizeof(irHeader) / sizeof(irHeader[0]), khz);
  irsend.sendRaw(button_bytes + (cmd * 16), 16, khz);
  irsend.sendRaw(irFooter, sizeof(irFooter) / sizeof(irFooter[0]), khz);
}

int z = 0;
unsigned long lastCode = 0;
void loop() {
  if (irrecv.decode(&results)) {
    switch(results.value) {
      case 0x00FFA25D: // CH-
      case 0xE318261B: 
        sendCommand(DVD_ON);
        break;
        
      case 0x00FF629D: // CH
      case 0x00511DBB: 
        sendCommand(TV_ON);
        break;

      case 0x00FFE21D: // CH+
      case 0xEE886D7F: 
        sendCommand(V_AUX);
        break;

      case 0x00FF22DD: // |<<
      case 0x52A3D41F: 
        sendCommand(ALL_OFF);
        break;
        
      case 0xD7E84B1B: // >>|
      case 0x00FF02FD: 
        sendCommand(SAT_ON);
        break;
        
      case 0x20FE4DBB: // >||
      case 0x00FFC23D:
        sendCommand(TAPE_ON);
        break;

      case 0x00FFE01F: // VOL-
      case 0xF076C13B: 
        sendCommand(VOL_DOWN);
        break;
        
      case 0x00FFA857: // VOL+
      case 0xA3C8EDDB: 
        sendCommand(VOL_UP);
        break;
        
      case 0x00FF906F: // EQ
      case 0xE5CFBD7F:
        sendCommand(TV_MENU);
        break;

      case 0x00FF6897: // 0
      case 0xC101E57B:
        sendCommand(KEY_ZERO);
        break;
        
      case 0x00FF9867: // 100+
      case 0x97483BFB:
        sendCommand(KEY_ONE);
        break;
        
      case 0x00FFB04F: // 200+
      case 0xF0C41643: 
        break;

      case 0x00FF30CF: // 1
      case 0x9716BE3F:
        break;
        
      case 0x00FF18E7: // 2
      case 0x3D9AE3F7:
        sendCommand(ARROW_UP);
        break;
        
      case 0x00FF7A85: // 3
      case 0x6182021B: 
        break;
      
      case 0x00FF10EF: // 4
      case 0x8C22657B:
        sendCommand(ARROW_LEFT);
        break;
        
      case 0x00FF38C7: // 5
      case 0x488F3CBB:
        sendCommand(TV_SAT_DVD_GO);
        break;
        
      case 0x00FF5AA5: // 6
      case 0x449E79F:
        sendCommand(ARROW_RIGHT);
        break;
      
      case 0x00FF42BD: // 7
      case 0x32C6FDF7: 
        break;
        
      case 0x00FF4AB5: // 8
      case 0x1BC0157B:
        sendCommand(ARROW_DOWN);
        break;
        
      case 0x00FF52AD: // 9
      case 0x3EC3FC1B: 
        break;

      case 0xffffffff:
        //this means we've had a repeat... use the last code and allow volume up/down
        if (lastCode == 0x00FFE01F || lastCode == 0xF076C13B) sendCommand(VOL_DOWN);
        if (lastCode == 0x00FFA857 || lastCode == 0xA3C8EDDB) sendCommand(VOL_UP);
        break;
      
      default:
        if (results.value > 0xF0FFFF and results.value <= 0xffffffff)
          Serial.println(results.value, HEX);
        break;
    }
    //don't enter on 0xffffffff here, otherwise we'll whack our repeat!
    if (results.value > 0xF0FFFF and results.value < 0xffffffff) {
      lastCode = results.value;
    }
    //restart the receiving after sending!
    irrecv.enableIRIn();
    irrecv.resume();
  }
  delay(100);
}

DSC06317

You'll note that I have a V.Aux button configured up there. Turns out that I couldn't set both SCART plugs to DVD and cycle through... one would default to V.AUX automatically when trying to set the first to DVD. I therefore had to be able to press the button. The base configuration didn't have this coded! Ah! Found the button here. I have a suspicion there's a host of other buttons to map... Maybe I should go and buy a remote.

Meanwhile, turns out that this thread is the source of the correct configuration. Doesn't seem to have all the buttons though!

DSC06324 DSC06321 DSC06325

With all this done, attempting to get to the service menu with MENU,1,1,GO doesn't work. I do get the software version with MENU,0,0,GO... So I may be locked out. Regardless... I wasn't able to fix the issue I actually wanted to: the MSX still hates RGB. Loves Composite though!

Filed under: Retro Leave a comment
Comments (0) Trackbacks (5)

No comments yet.


Leave a comment


*