Hi All,
Hope everyone out there in Arduino land are safe and well under the circumstances.
Hopefully this is the right place to post this question, I'm sorry if I've misunderstood the categories.
I'm using an Arduino Micro for this project (I also have a new in box Arduino Uno if that makes life easier?
I am connecting the Arduino to a 'DollaTek MAX3232 RS232 Serial Port To TTL Converter Module DB9 Connector'. I have successfully used this Arduino and this adapter with serial cable to successfully control an NEC projector over serial/TTL. So as far as I can tell, this hardware is suitable for this new project.
The project is to connect to the serial/TTL port on a Bang & Olufsen Beosystem 3 (the monitor port) and read out the commands it would send to a B&O TV if one was connected to it. The TV's are essentially Panasonic plasma screens and you can see what I'm expecting to see come out of the BS3 by looking at a Panasonic manual: Panasonic manual
I'm essentially trying to do what Nigel has done on a Raspberry Pi but on an Arduino - Nigel's Project
So far my code is only a simple serial monitor, it is taking what it sees/hears on the software serial (external) and relays it on the serial monitor. I'm using this to see if I'm getting the correct commands, which I sort of am but it is not in the correct format. The code looks like this:
//Define all appropriate variables
#define rxPin 14
#define txPin 15
int ByteReceived;
char buf[200];
unsigned int i = 0;
#include <SoftwareSerial.h>
SoftwareSerial External(rxPin, txPin); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Native USB only
}
// set the data rate for the SoftwareSerial port
External.begin(9600);
}
void loop() // run over and over
{
External.setTimeout(10);
int len = External.readBytes(buf, 136);
if (len > 0)
{
Serial.print("len");
Serial.println(len);
Serial.println(buf);
Serial.flush();
}
}
I get a semi useful output on the serial monitor:
From Nigel's comments I should be looking for something like /02PON/03 however I'm only getting PON.
I work in IT infrastructure and only rarely touch code and if it is, it's MS PowerShell, so this is all a bit alien to me.
Would someone be able to provide guidance as to how to get the correct format of output? Eventually I will want to add IF/case statements where if 'power on detected' then issue a CEC power on command to the TV, but I'm not that far yet.
Really welcome and appreciate any feedback, as I say, I'm not all that good at this!



