Announcement

Collapse
No announcement yet.

uCAM-232 unable to synchronize with Arduino

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • uCAM-232 unable to synchronize with Arduino

    We have tested the uCAM-232 on a computer with the test software 4dsystem provide, it work well.
    Now we what to use the uCAM with an arduino card. The uCAM is plugged on the arduino (5v,ground and tx uCAM on rx Arduino, rx uCAM on tx Arduino) but we are unable to synchronize with the uCAM.

    Here is a piece of code we are using to sync uCAM, the arduino never go on the "while( Serial.available() > 0 )" loop, can you help us ? thanks

    HTML Code:
    #define RESPONSE_TIME 100
    #define LED_PIN 13
    
    byte _command[6];
    
    void setup()
    {
    pinMode( LED_PIN, OUTPUT );
    digitalWrite( LED_PIN, LOW );
    Serial.begin(14400);
    }
    
    void loop()
    {
    uint8_t attempts = 0;
    
    _command[0] = 0xAA;
    _command[1] = 0x0D;
    _command[2] = 0x00;
    _command[3] = 0x00;
    _command[4] = 0x00;
    _command[5] = 0x00;
    
    while( attempts < 60 )
    {
    // Send a SYNC command
    for( int i = 0; i < 6; i++ ) Serial.print( _command[i], BYTE );
    
    unsigned long time = millis();
    
    while( millis() - time  0 )
    {
    digitalWrite( LED_PIN, HIGH );
    }
    }
    }
    }
    best regards,

  • #2


    Hello prolland,
    Have you even been able to synchronize through a terminal emulator? I tried this and have not succeeded. For example, using something like putty.exe assuming you are using a windows box.
    If I can get this to work, then I want to first work in Python's Pyserial environment. I have written some pyserial libraries that is synchronized with Arduino sketches and want to synchronize this camera with other devices that are already working through Arduino. So your project really interests me.
    You'd think that since its a RS232 camera you can run commands through the serial port (like the demo program). I guess I'm missing something.
    Richard

    Comment


    • #3


      are your serial tx / rx lines from the arduino going to a RS232 line driver or straight to the Camera - it needs to go via a MAX232 or likes

      Comment


      • #4


        Dear,You were right, arduino use TTL signal (5v) ... sorry for the annoyance.
        So we have bought a new camera TTL 3.3v with a TTL3.35v converter.Thanks you, for your help !Best regards

        Comment


        • #5


          its no problem - you can get a adapter from rs232 to 5v ttl - just a max233 - free on sample from maxim-ic

          Comment

          Working...
          X