Quite the task

So, as the title implies, I have quite the task at hand.

I need to create somewhat of a decoder for an Arduino to understand an incoming signal from a different language.

I hope I explained that properly.

As long as I can be pointed in the right direction, as far as study materials go, I think I can handle it on my own. I would really appreciate any advice or knowledge you all have to share.

Thank you!

I hope I explained that properly.

Nope. What type of signal (radio, electrical, audio, spoken word, printed material, smoke signals)?

What language?

What should the Arduino do with the "understanding" gained from the signal?

If you're talking about languages in the sense of english/french/etc - the arduino is not an appropriate tool. If you want decent translation automatically, that calls for using an online translation service (they have a huge corpus to work with, unlike you, and certainly unlike anything that would fit on an Arduino). Interpreting human languages is really hard for computers.

If you mean from a different programming language, more details needed.

So, in response to the both of you, the language is one of someone else's creation. It's sent to the arduino using an Xbee pro and the signal is going to be used to control the arduino wirelessly from a computer.

The software being used is of someone else's creation (and he doesn't know how to make it compatible with arduino, which is great), so I can't exactly share specific details, for business reasons, obviously.

What ever the program is, it must go into nonvolatile memory and be able to understand what is being sent to interpret what it is being told to do.

Does that help?

deavonwalden: Does that help?

NO.

Can you post an example of a message in this unknown language and an example of what it should be translated into?

...R

Wait, do you mean "language"? Or do you mean "protocol"?

It's starting to sound like you're just taking a serial datastream with commands coming from the xbee and interpreting it, so the serial input basics thread would be a good place to start.

Totally different than the impression I got from your first post.

So yeah, you're not succeeding at communicating enough information for us to advise.

You seem to be talking about a comms protocol, we don't call those languages for some reason.

Without details of the protocol there is nothing we can do to help.

The software being used is of someone else's creation (and he doesn't know how to make it compatible with arduino, which is great)

A comms protocol is processor agnostic. You need to write a decoder, yes, but that just a matter of programming. However if the protocol is too fast that will be a problem.

But we know this is sent via an XBee pro which presumably means its serial compatible?

d000, 1, 2

Field 1, Command Code/unit id (which arduino I'm talking to) Field 2, Field Change (what I want to change (name, state, id code, etc...) on the arduino) Field 3, What I am changing it to

My apologies for my explanation not being entirely clear. To be honest, I'm still wrapping my brain around everything he explained to me. This is what he gave me, as far as what happens on the end of his software, that needs to be decoded by the arduino.

To add, he said I need to have a a solid understanding of RS232 Protocol, so yes, I guess I should have mentioned that first. I'm still understanding the terminology, so again, my apologies. He also said "the Serial Communication needs to be set at 9600 BAUD."

Outside of this, I can't think of anything else I have to share that would further explain what I have to do.

Sounds like basic serial interfacing then.

One thing that’s really useful (from when I was working with a serial protocol) is to take a usb-serial adapter, and just connect it to ground and one of the data lines - that way, you can monitor whats coming down the serial line, and monitor the response to it. The protocol I was working with was bidirectional, so I had two of these extra serial adapters, one monitoring each direction.

deavonwalden: d000, 1, 2

Field 1, Command Code/unit id (which arduino I'm talking to) Field 2, Field Change (what I want to change (name, state, id code, etc...) on the arduino) Field 3, What I am changing it to

My apologies for my explanation not being entirely clear. To be honest, I'm still wrapping my brain around everything he explained to me. This is what he gave me, as far as what happens on the end of his software, that needs to be decoded by the arduino.

To add, he said I need to have a a solid understanding of RS232 Protocol, so yes, I guess I should have mentioned that first. I'm still understanding the terminology, so again, my apologies. He also said "the Serial Communication needs to be set at 9600 BAUD."

Outside of this, I can't think of anything else I have to share that would further explain what I have to do.

Looks pretty normal. You also need to know how the three fields are separated from each other, as they are probably not fixed length. And how long may the variable length field be?

Paul

I'll definitely look into that serial adapter. That sounds like it would be very helpful.

As far as how the fields are separated, the only thing he said is they're separated by commas. Nothing mentioned on the length of each field.

Although, from the way he explained it, I'm 99% sure that everything is represented by integers between 1-9.

It could be something like:

1=Change ID, 2=PowerMode, 3=Reset, etc...

deavonwalden: I'll definitely look into that serial adapter. That sounds like it would be very helpful.

As far as how the fields are separated, the only thing he said is they're separated by commas. Nothing mentioned on the length of each field.

Although, from the way he explained it, I'm 99% sure that everything is represented by integers between 1-9.

It could be something like:

1=Change ID, 2=PowerMode, 3=Reset, etc...

Commas work fine. Except till you get to the end of the variable length field. You need to know the length of the message so you don't run off the end and pick up stuff from the previous longer message.

Paul

deavonwalden: d000, 1, 2

For that sort of stuff have a look at the parse example in Serial Input Basics

What you have is data. Not a "language"

Comma Separate Values (CSV) is a very ordinary programming conecpt.

...R

deavonwalden: d000, 1, 2

Field 1, Command Code/unit id (which arduino I'm talking to) Field 2, Field Change (what I want to change (name, state, id code, etc...) on the arduino) Field 3, What I am changing it to

So the 'd' acts as a start of packet marker. It would be useful if there was an end of packet too - is there an end of line sent by any chance? If not, you can use parseint with it's timeout to deal with the lack of a clear indication of the final number being complete.

Ok, all of that makes sense.

He himself did not want to take on the task of learning the arduino language, although it is relatively straight forward, so his lack of understanding is probably why he made this sound like it would be such a task to complete. From what I've gathered from the responses, it isn't "easy," in the purest sense of the word, but it does seem like it will be simple once I understand it and spend enough time with it.

To answer the last question, yes, d is the "listen-up" command, but there is, as of right now, no end-of-line character (at least not that he's shared with me).