Writing Serial.read data to .txt file on embedded linux

Discussion in 'Arduino IDE' started by sebasmora, Mar 16, 2014.

  1. sebasmora

    sebasmora New Member

    Joined:
    Dec 11, 2013
    Messages:
    7
    Likes Received:
    0
    I am using a CMOS camera to take pictures through serial communication. This works perfectly fine and as a result i get an array of HEX values which using a python script get converted into a nice JPEG image. I need to automatically store this array into a text file in the linux console on the Udoo. I have read numerous threads and forums but it all goes back to arduino and an external SD library that communicates using serial. I dont know how to create a text file on the linux desktop and store the array there. Any ideas?
    This might be trivial im not sure, this is my first time working with arduinos and its IDE. All help is more than appreciated.
    Thank you!
     
  2. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    eh ? , I`m a little lost what happening , Not sure if I have this right .
    The Sam/Arduino part has a CMOS camera which sends the picture as HEX value via serial to the quad part, which the quad part picks up decodes with python ?.

    Make a python script to dump your data !!!
     
  3. sebasmora

    sebasmora New Member

    Joined:
    Dec 11, 2013
    Messages:
    7
    Likes Received:
    0
    Correct. The sam has a CMOS camera connected to Serial3. This takes the picture and returns an array of hex characters. In order to decode it with python i need to save this array of hex values to a text file somewhere on the quad part. Right now i can only see this array using the serial monitor on the arduino IDE. What im trying to figure out is how can I create a text file and write the array data into it.
     
  4. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
  5. sebasmora

    sebasmora New Member

    Joined:
    Dec 11, 2013
    Messages:
    7
    Likes Received:
    0
    the issue is that there is too much data in a picture to transmit through serial from the SAM to the Arm hence it takes a long time. Connected the cameras to the usb ports instead and works perfectly. thank you!
     

Share This Page