Home Forums EasyTransfer Library Support Forum Serial Communications with Easy Transfer

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2622
    Anonymous
    Inactive

    Hi, Thanks for the great library,

    I am verly new to all this , and would like to request some help.

    I am trying to send serial to my second arduino with the library but wanted to know the “most efficient way”
    I have a about 50 serial commands to send and am thinking to store them in a array. I would like to send the array accros with ET.

    I have a command like this
    “uint8_t camera[9] = { 0x81, 0x01, 0x04, 0x47, 0x08, 0x0C, 0x04, 0x00, 0xFF };”
    creating the array but have not yet found a way to transmit this in ET. Could you assist me an give me the code. I have got his working over a Softserial line but ET would be better for me because I also need to send stick commands and ET Should take care of the serial part of the project?.

    (I got a bid lost with Byte, Write, HEX, DEC and converting them to String)

    Thanks in advance for any feedback.

    #2627
    Anonymous
    Inactive

    Done some more testing and got the following, (So answering my own post.)

    This is the declaration in the send data structure for EasyTransfer: (need to do this in the send and receive arduino and exactly the same “also the order you declare them need to be the same”)

    struct SEND_DATA_STRUCTURE{
    uint8_t camera3[9];
    }

    Then I assign the sample serial data to the Array.

    uint8_t camera[9] = { 0x81, 0x01, 0x04, 0x47, 0x08, 0x0C, 0x04, 0x00, 0xFF };

    With this I get the serial data across to the other Arduino. And use ‘mySerial.write’ to send it to my RS 232 device with an TTL to RS232 Circuit (max 232) .

    I still have the question if this a “good” way to transmit my serial data, I have the feeling the data is being send by ET as a string and is using more Bytes then  needed. So perhaps I am better of writing my own code to transfer the data ?
    I will keep you posted in the meantime of my further developments.

     

     

    #2710
    Bill
    Member

    I still have the question if this a “good” way to transmit my serial data,

    ‘Good’ like time is relative. Sending 9 bytes is easy-peasy compared to some of the things I’ve used ET for. I can’t pass more judgement without what the data you are sending represents or what it does. But as it is now, 9 bytes has an unremarkable impact on CPU time.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.