Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Problem with movie2serial example octows2811 library

  1. #1

    Problem with movie2serial example octows2811 library

    Hey

    I am currently working on a project to create a POV ( persistence of vision setup ) with 2 4 meter high poles that move : see http://robzimmermann.com/rob_zimmerm...ppschwapp.html

    I have currently just on led strip connected and the videoDisplay sketch running on the teensy 3.0, and when i run the processing movie2serial sketch I get the following error

    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7
    Java lib Version = RXTX-2.1-7
    Serial Ports List:
    [0] "COM4"
    Serial port COM4 is not responding.
    Is it really a Teensy 3.0 running VideoDisplay?

    It prints out the COM4 port, and I have changed the line to serialConfigure("COM4");

    I am running windows 8, but also tried in Ubuntu 12.04( but in Ubuntu 12.04 I noticed that the processing.video.*; library didn't work in Ubuntu) So I guess the example is used on a mac because the /dev/ name for the serial port which is not used in windows.

    I was wondering what might be the cause of this error, and what I could try to fix this, uploading always goes well, and the other examples ( rainbow etc) work on the teensy so the serial communication is working.

    I hope someone can help me with this problem!

    Regards,

    Tijmen van Gurp
    Last edited by tijmenvangurp; 04-08-2013 at 05:50 PM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,928
    Is the Teensy really running VideoDisplay and is it really COM4 ?

    You can check using the Arduino Serial Monitor. Type a "?" in the line on the top and click "Send". If Teensy 3.0 is really COM4 and running that program, you'll see it reply with 12 numbers. It should look like this:

    Click image for larger version. 

Name:	screen.png 
Views:	199 
Size:	16.1 KB 
ID:	365
    (click for full size view)

  3. #3
    Dear Paul,

    Thank you for the quick answer,

    I get the same screen:

    Click image for larger version. 

Name:	2013-04-08_2301.png 
Views:	159 
Size:	6.5 KB 
ID:	366

    so that is working perfectly.

    It looks like you are using Ubuntu do you think that makes any difference? I will try tomorrow morning ( Dutch time) with another computer, hope that with a new setup it will work. I could also try with my raspberry pi.

    Regards,

  4. #4
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    641
    Maybe the com port is busy? Do you have the Serial Monitor open when you are launching your Processing sketch?
    Do you have the same speed settings (ie 9600 baud), etc?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,928
    Quote Originally Posted by linuxgeek View Post
    Maybe the com port is busy? Do you have the Serial Monitor open when you are launching your Processing sketch?
    Do you have the same speed settings (ie 9600 baud), etc?
    The speed setting does not matter. It's always 12 Mbit/sec, regardless of the baud rate setting.

    But if you have the serial monitor open, that absolutely will interfere with Processing's ability to access the port.

  6. #6
    I have everything working now, switched to processing 2.0b8 32bits on windows 8, and changed this line:

    myMovie = new Movie(this, "C:/Users/Tijmen/Dropbox/Desktop/movie2serial/data/transitwee.mov");

    so that it has the full path length.

    Now I have to find a way how to change the code in such a way that a pot-meters value selects the vertical row of the movie to update and also instead of 4 led-strips horizontal, I have now 4 led-strips connected in one long vertical position... quite a challenge!

  7. #7
    Still struggling a bit to which part I should edit for my setup,

    my problem: instead of updating the whole screen at once, I want to update the screen sequentially with only vertical rows.

    000*0000000
    000*0000000
    000*0000000
    000*0000000
    000*0000000
    000*0000000

    0000*000000
    0000*000000
    0000*000000
    0000*000000
    0000*000000
    0000*000000

    the * is the led-strip which is moving ( see: http://robzimmermann.com/rob_zimmerm...ppschwapp.html )

    So basically I want to cut out one vertical row of the video, and send this to 8 different strips which are all connected vertically.

    One long led strip is scrubbing through the video, the position of the ledstrip is read out by a pot-meter, and this position will tell me the row out of the video to take.

    Is this even possible with the code?

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,928
    Quote Originally Posted by tijmenvangurp View Post
    Is this even possible with the code?
    Anything is possible with enough programming!

    The truth is, what you're trying to do here is pretty unique, so you're going to have to do a pretty significant amount of coding. OctoWS2811 can help you tremendously, but moving the data automatically while allowing your code to get more data ready. But it isn't the entire solution. You're going to have to build a substantial amount of your own code on top of OctoWS2811.

    One of the first things to consider is where you're interfacing the position sensor?

    You might try connecting it to the PC. In that design, the PC would try to rapidly respond to the movement and transmit only the data which displays for a brief instant as the poles move. The nice part is you need very little code on the Teensy 3.0, and it can probably be very similar to the VideoDisplay example that exists already. The hard part is rapid real-time response on a PC running Windows, Linux or Mac OS-X is hard.

    You might try connecting the sensor to the Teensy 3.0. In this scheme, you'd probably have the PC compose all the possible pixel patterns at every location. You'd need to write more code on the Teensy to rapidly check for the arrival of new data (which could be any part of the display) and changes in position (where you'd send just one small section to update the LEDs). This obviously involves putting much more of the work into the Teensy side, but the nice part is Teensy isn't running a big operating system, so you only need to interleave checking for incoming data and new positions (and OctoWS2811 will stream the data out to the LEDs for you, so it won't slow your program's response).

    Either way, you absolutely must get past the mindset that only a trivial change to existing examples (which update a whole image to the LEDs) is somehow going to make this project work. You've got some serious work to do, reading the position sensor and trying to get rapid response for updating the LEDs with a small piece of a much larger image.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •