Maintenance notice: These forum archives are read-only, and will be removed shortly. Please visit our forums at their new location, https://www.evilmadscientist.com/forums/.

Peggy 2 Video Stream

edited March 2013 in LED Matrix Kits
The main reason I bought the Peggy 2 was to have the option for streaming some low resolution video.
I read though the following page here: http://www.evilmadscientist.com/2009/video-peggy-in-action/
As well as Jay Clegg's page here: http://www.planetclegg.com/projects/Twi2Peggy.html
I proceeded to order the parts I saw necessary (Peggy 2, Businesscard board, etc.) and they arrived shortly. I just got into building it and I scrolled down on the evilmadscientist page to see the following comment from Windell..

"This whole method is somewhat out-of-date. On current-generation Peggy2 and Peggy 2LE boards, you *do not* need to use this method– just configure it for “SER” mode (as opposed to “P2″ mode) and connect the Peggy directly to your computer through the FTDI cable, and stream video that way, using our sample code."


So that sounds pretty good! I have the Peggy 2 and I have the FTDI cable. Unfortunately though, I can't find any more in depth info on it than that comment. How do you go about this process? And which code would I use to make it work this way?

Thank you!

Comments

  • edited March 2013
    First, build up the Peggy 2 with the "SER" option selected. 

     Download Arduino and Processing. Download and install the Peggy2Serial library for Arduino. 

     Use Arduino to upload the RecvSerial example sketch to the Peggy. 
     (Examples> Peggy2Serial>RecvSerial) 

    Open Processing, and run the included example sketch for sending webcam video to the Peggy. 
    (Examples> Peggy2Serial>RecevSerial > Processing >MirrorPeggy3)

  • edited April 2013
    Thank you for the help Windell!

    I have downloaded both Peggy2Serial and Peggy2_RecvTWI folders. Also, Arduino and Processing.

    I've loaded the Peggy2Serial library to Arduino. Ok, that's done so now I went into File>Examples>Peggy2Serial>RecVSerial and thats open. Now how do I load it to the Peggy? I clicked Upload and it does not recognize my serial line to the peggy (using a Mac). The computer also doesn't recognize the Peggy when I plug it in either.

    What do you suggest I do? I may be reading your previous instructions incorrectly and if so my mistake.

    Also, this is my Peggy2 hooked up to the wall supply. Looks a little wonky, I hope this is how it should look currently (in serial mode).



    Thank you!
  • Hi Shane,
    The Peggy2Serial library is an Arduino *library*. You need to install it, not open it from within Arduino.

    See here for how to install Arduino libraries:

    http://arduino.cc/en/Guide/Libraries

    As for the behavior of your Peggy, it's clear that one of your columns isn't working, so check the soldering at the LED driver chips, base resistors, and transistors.

    As for the rows that are not lit, that should be expected until you reprogram it with an example program from the correct library.
  • Hi Shane,
    It looks like you must have edited your earlier message to indicate that you were able to get the library installed and my reply irrelevant-- that's pretty strange, actually.

    For the serial connection, make sure that you have the right port and board type selected. Can you see the port appear in the serial port menu after you plug in the cable?
  • Hello Windell,

    Sorry about that, I did alter my post. I didn't see a reply from you so I figured you hadn't seen it yet.

    Here is what I am seeing right now when hooked up and trying to upload to the Peggy...
    image
  • I don't see the USB-TTL cable in that list; you might try installing the FTDI VCP driver.
  • edited April 2013
    Ok, I installed the FTDI VCP Driver, I clicked upload and it says "Done compiling" for the RecVSerial file. Means it's installed on the board correct?

    Next, I have MirrorPeggy running on Processor.

    Now, how do I have the two communicate with each other?

    I really appreciate the help.
  • If you've clicked the "verify" button, then "done compiling" is a successful result. If you've clicked the "upload", then it's an intermediate result-- it compiles before uploading. There should be some sort of final result (good or bad) reported at the end. In any case, you do need to make sure that the rightnserial port and board are selected before uploading.

    When it has uploaded, you should see a distinct test pattern (grayscale ramps) that indicates that it is loaded.
  • I clicked Verify and it prompts me with the following in grey letters: "Binary sketch size: 1,740 bytes (of a 258,048 byte maximum)"

    I did it on both the tty and the cu serial ports it shows in Arduino. When I uploaded on either of those the lights flashed for about a second or two and went back to the same pattern seen in the video. 

    I open MirrorPeggy and it opens fine on my Mac but nothing changes on the Peggy display so I'm assuming I missed a step here somewhere.
  • edited April 2013
    Also, currently the Arduino has auto-selected Mega 2560/ Mega ADK as the default board. It's a 328P as far as I understand, but there are a few choices for that.

    Edit: Tried all the 328P boards, uploaded and verified all, ran serial monitor and then started MirrorPeggy. Nothing is happening.
  • The board type needs to be set as Duemilanove w/ Atmega328.
  • edited April 2013
    Alright, thank you for that information. Attached I have a video showing that I have set the board for that option and what it is currently doing. Perhaps I am missing a step somewhere but I still cannot manage to make it work. Sorry for the blurry video in advance.

  • Have you entered the name of your serial port in the Processing skectch?
  • That was indeed the problem, I input the correct port and it's working. Now I am running into another problem where those rows don't light and the one column still is out. I checked and everything really seems soldered down correctly but there is an interesting thing that happens when I bend the board ever so slightly, see video here:



  • If flexing the board changes something, there's still a bad solder joint-- that temporarily opens or closes when flexed --or the chips are not inserted all the way.

    The selected row is controlled by the 74HC195 demultiplexer chips. Since the problem is in the top half of the rows, the particular chip to worry about is U2.   The fact that you are losing regularly-spaced pins further suggests that that the problem is on the input side.  That also means that the problem could also be at the U1, on the connections towards U2. 

    And, you still have that column to fix as well-- the likely issue is at one of the pins of the LED driver chips.  Check near the middle-bottom of U4, in the area by C6.  And, make sure that U4 is fully seated.
Sign In or Register to comment.