Shop OBEX P1 Docs P2 Docs Learn Events
Video Camera Control (VISCA) with BS-2 — Parallax Forums

Video Camera Control (VISCA) with BS-2

BGardinerBGardiner Posts: 6
edited 2008-03-25 11:48 in BASIC Stamp
This is the first time I have used a Basic Stamp.

I have written the program, and it outputs data in the debug screen. When I connect the stamp to the camera, nothing!

The camera is an EVI-D70. It wants hex sent to it. I am sending it from the serial port on the homework board. Below are the·four lines that initialize the camera:

SEROUT 16, 16468, [noparse][[/noparse]HEX2 136, HEX2 48, HEX2 01, HEX2 255]
PAUSE 1000
SEROUT 16, 16468, [noparse][[/noparse]HEX2 136, HEX2 01, HEX2 00, HEX2 01, HEX2 255]
PAUSE 1000

Again, it outputs the hex on the debug screen, but will not communicate with the camera.

Thanks for any suggestions.

Brian

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-20 03:44
    The camera probably doesn't want hex. It probably wants the actual byte values. Try taking out the HEX2 and see what happens.
  • BGardinerBGardiner Posts: 6
    edited 2008-03-20 11:19
    So, you mean like this sending the hex values as ascii?

    SEROUT 16, 16468, [noparse][[/noparse]"88,72,01,FF"]
    PAUSE 1000
    SEROUT 16, 16468 [noparse][[/noparse]"88,01,00,01,FF"]
    PAUSE 1000
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-03-20 11:43
    BGardiner -

    A HEX constant is specified by preceeding the HEX representation with a $ so that PBASIC knows it's HEX and not ASCII.

    Try this:

    SEROUT 16, 16468, [noparse][[/noparse]$88,$72,$01,$FF] 'Send 4 HEX constants
    PAUSE 1000
    SEROUT 16, 16468 [noparse][[/noparse]$88,$01,$00,$01,$FF] 'Send 5 HEX consstants
    PAUSE 1000

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Involvement and committment can be best understood by looking at a plate of ham and eggs. The chicken was involved, but the pig was committed. ANON
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-20 11:55
    BGardiner,
    I did mean that you take out the HEX2 and leave the rest like: SEROUT 16, 16468, [noparse][[/noparse] 136,48,1,255 ]
  • BGardinerBGardiner Posts: 6
    edited 2008-03-20 13:47
    The camera documentation shows that the camera wants the hex code not the decimal.
  • BGardinerBGardiner Posts: 6
    edited 2008-03-20 18:29
    Attached is an example of the code format....
  • BGardinerBGardiner Posts: 6
    edited 2008-03-25 11:48
    Mike,

    It is working now, thank you, your instruction proved to be correct after I fixed a pin-out problem.

    --Brian
Sign In or Register to comment.