Show Posts
Pages: 1 2 [3] 4 5
31  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 08, 2011, 10:32:50 am
Hello,

Does anybody know if jmcvideo has been updated to work on windows???

I am trying to play a video from an RFID reader tag and I am recieving a PApplet.RendererChangeException Error.

If I can update jmcvideo to work on windows it should be able to solve this problem.

All code is available in previous post's or I can repost the code.

I really want to get this to work.

Any help is appreciated.

Thank you
32  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 08, 2011, 05:58:24 am
Can it be done without a Macintosh?
33  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 09:51:20 pm
Hey,

The solution could worsen the problem, I follow instructions and still have a missing library, maybe because I use Windows, maybe it is not good, maybe I should have purchased a mac.

External libraries sounds good, I believe it could work, on the other hand problems are all I seem to be having.

Thank you for the idea!

Unfortunately the creator of jmcvideo left this comment over a year ago :

Quote
Hi all, sorry about the Windows bug that I haven't had a chance to fix. I just completed my Masters, so I will have time to work on it soon. I read that there are rumors that JMC will be officially included with Java 7 sometime next year, which would make it much easier to develop/troubleshoot. And also JavaFX 1.3 is due to ship sometime soon (a preview was shown at Devoxx apparently) so hopefully that includes some fixes for JMC. In the meantime it is still true that jmcvideo is broken on Windows  Undecided  I'll post here when the issue is resolved. Thanks, Angus
34  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 01:12:56 pm
Researching the error exception:

Quote
public static class PApplet.RendererChangeException
extends java.lang.RuntimeException

Exception thrown when size() is called the first time.

This is used internally so that setup() is forced to run twice when the renderer is changed. This is the only way for us to handle invoking the new renderer while also in the midst of rendering.

Found on: http://processing.googlecode.com/svn/trunk/processing/build/javadoc/core/processing/core/PApplet.RendererChangeException.html
35  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 12:56:07 pm
Lesto, that was a really good try but now its throwing another error that is worse, it is a PApplet$RendererChangeException

I have googled this and apprently there is a fix waiting for it?

Quote
+1 on this; it makes it difficult to use 0152 + OpenGL with JRuby. But, I understand we're in the midst of change. I can be patient.

Without the P2D it throws an out of bounds exception.

Seems like one thing after another, I'm so glad the number is printing correctly.

We're on the verge of a breakthrough I feel.

You have been very helpful and I hope we can get this to work.

THank you.
36  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 12:40:11 pm
UPDATE

The baudrate was a massive success, the correct number is being outputted by the println(command); line which has brightened my day!

The error message now is an ArrayOutOfBoundsException: Coordinate out of bounds! and highlights the line:

  if (myMovie != null){
      image(myMovie, 0, 0);                <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  }
 
The numbers after the movie parameter are the X and Y axis for the position of the movie? Therefore 0 and 0 are correct?

I am recieving the same message whether i use absolute or relevant path.

I understand what you said about the errors, if I recieve an error I know there is something to work on but without a message it would be much harder.

Thank you for your assistance.
37  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 12:31:15 pm
Thank you so much for getting back to me, I didn't see the baudrate was different, I will change it to 2400 asap.

Quote
  println(Serial.list());
  myPort = new Serial(this, Serial.list()[0], 9600);

This was the original code that I used, when the serial list was printed said COM3[0] COM4[1] and since i was using com4 I thought [1] was the correct number for that, if i change to 0 it will be looking for communication through COM3 which has nothing in it.

Quote
myMovie = new Movie(this,  "C:\Users\Rich\Documents\Processing\sketch_apr05a\3600A9C9F8.mov");
Does not work as an absolute path, it comes back with the error "unexpected char:  'U'" and if i delete the quotation marks it returns the error "unexpected char: '\'"

My arduino is always connected during testing, to port COM4.

Thank you for your advice, i'm learning to debug processing for the first time, your help is brilliant.

38  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 10:44:36 am
I have edited the code to load the absolute video, basically not using the command variable, I am still printing the command variable but I am now recieving a different error message.

The code looks like this:
Quote
import processing.serial.*;
import processing.video.*;

Serial myPort;  // The serial port
Movie myMovie;

void movieEvent(Movie m) {
  m.read();
}

void setup() {
  // Open whatever port is the one you're using.
  myPort = new Serial(this, Serial.list()[1], 9600);
 
}
void draw() {
while (myPort.available() >= 10) {
  //Video Code:
  String command = "";
  for (int i=0;i<10;i++){
     command += myPort.readChar();
  }
  println(command);
  size(400, 400);
  myMovie = new Movie(this,  "3600A9C9F8.mov");
  myMovie.play();
}
 
  if (myMovie != null){
      image(myMovie, 0, 0);
  }
 
}

"3600A9C9F8.mov" is the name of my movie file which is in the sketch folder, the error I am getting is as follows:

ArrayIndexOutOfBoundsException: Coordinate out of bounds!
Quote
processing.app.debug.RunnerException: ArrayIndexOutOfBoundsException: Coordinate out of bounds!
   at processing.app.Sketch.placeException(Sketch.java:1543)
   at processing.app.debug.Runner.findException(Runner.java:582)
   at processing.app.debug.Runner.reportException(Runner.java:558)
   at processing.app.debug.Runner.exception(Runner.java:498)
   at processing.app.debug.EventThread.exceptionEvent(EventThread.java:367)
   at processing.app.debug.EventThread.handleEvent(EventThread.java:255)
   at processing.app.debug.EventThread.run(EventThread.java:89)
Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
   at sun.awt.image.IntegerInterleavedRaster.setDataElements(IntegerInterleavedRaster.java:404)
   at processing.core.PGraphicsJava2D$ImageCache.update(Unknown Source)
   at processing.core.PGraphicsJava2D.imageImpl(Unknown Source)
   at processing.core.PGraphics.image(Unknown Source)
   at processing.core.PApplet.image(Unknown Source)
   at sketch_apr05a.draw(sketch_apr05a.java:52)
   at processing.core.PApplet.handleDraw(Unknown Source)
   at processing.core.PApplet.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)

The following code is printed above the error, I dont understand why this is printed but the top line is the command variable:

ø???ø?
x x<ð?ø x
ð?? x ??x

Please help with this, it is starting to get more confusing.
39  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 10:03:58 am
Other advice I have got has been to add code[10] = '\0' to the arduino code, this makes the end of the array?

Another idea is to use Serial.readUntil() method to read the data.
40  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 09:54:50 am
Could someone please help me figure this out, please
41  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 09:03:52 am
command = ø???ø?
42  Using Arduino / Project Guidance / Re: RFID Video Daemon on: April 07, 2011, 08:53:13 am
NullPointerException

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
ø???ø?

The file is ø?? ? ? ? .mov is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
processing.app.debug.RunnerException: NullPointerException
   at processing.app.Sketch.placeException(Sketch.java:1543)
   at processing.app.debug.Runner.findException(Runner.java:582)
   at processing.app.debug.Runner.reportException(Runner.java:558)
   at processing.app.debug.Runner.exception(Runner.java:498)
   at processing.app.debug.EventThread.exceptionEvent(EventThread.java:367)
   at processing.app.debug.EventThread.handleEvent(EventThread.java:255)
   at processing.app.debug.EventThread.run(EventThread.java:89)
Exception in thread "Animation Thread" java.lang.NullPointerException
   at quicktime.util.QTHandle.<init>(QTHandle.java:287)
   at processing.video.Movie.init(Unknown Source)
   at processing.video.Movie.<init>(Unknown Source)
   at processing.video.Movie.<init>(Unknown Source)
   at sketch_apr05a.draw(sketch_apr05a.java:47)
   at processing.core.PApplet.handleDraw(Unknown Source)
   at processing.core.PApplet.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
43  Using Arduino / Project Guidance / Re: Arduino serproxy on: April 06, 2011, 10:23:15 pm
I need help finding the error please.

Arduino Code
Quote
int  val = 0;
char code[10];
int bytesread = 0;

void setup() {

Serial.begin(2400); // RFID reader SOUT pin connected to Serial RX pin at 2400bps
pinMode(2,OUTPUT);   // Set digital pin 2 as OUTPUT to connect it to the RFID /ENABLE pin
digitalWrite(2, LOW);                  // Activate the RFID reader
}  


 void loop() {

  if(Serial.available() > 0) {          // if data available from reader
    if((val = Serial.read()) == 10) {   // check for header
      bytesread = 0;
      while(bytesread<10) {              // read 10 digit code
        if( Serial.available() > 0) {
          val = Serial.read();
          if((val == 10)||(val == 13)) { // if header or stop bytes before the 10 digit reading
            break;                       // stop reading
          }
          code[bytesread] = val;         // add the digit          
          bytesread++;                   // ready to read next digit  
        }
      }
      if(bytesread == 10) {              // if 10 digit read is complete
        Serial.print("TAG code is: ");   // possibly a good TAG
        Serial.println(code);            // print the TAG code
      }
      bytesread = 0;
      digitalWrite(2, HIGH);                  // deactivate the RFID reader for a moment so it will not flood
           delay(1500);                       // wait for a bit
           digitalWrite(2, LOW);                  // Activate the RFID reader
    }
  }
}

Daemon Code
Quote
import processing.serial.*;
import processing.video.*;

Serial myPort;  // The serial port
Movie myMovie;

void movieEvent(Movie m) {
  m.read();
}

void setup() {
  // Open whatever port is the one you're using.
  myPort = new Serial(this, Serial.list()[1], 9600);
 
}
void draw() {
while (myPort.available() >= 10) {
  //Video Code:
  String command = "";
  for (int i=0;i<10;i++){
     command += myPort.readChar();
  }
  println(command);
  size(400, 400);
  myMovie = new Movie(this,  command+".mov");
  myMovie.play();
}
 
  if (myMovie != null){
      image(myMovie, 0, 0);
  }
 
}

Error Message: The file "ø???ø????.mov" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.

Help is highly appreciated.
44  Using Arduino / Project Guidance / Re: Arduino serproxy on: April 06, 2011, 10:09:10 pm
Thank you that makes sense now.

I cannot use the full path for some reason, when i put "C:\Documents\Sketch\" +command+ ".mov"; it comments and tells me that it is an incorrect string, however, I printed out the command variable and it came back as: ø???ø? which is nothing like the output from the arduino. (3600A9C9F8)

The code inside the arduino is the example code from: http://www.arduino.cc/playground/Learning/PRFID

This is the variable 'code' that is used by the arduino:
char code[10];     //character array of 10
val = Serial.read();   //reads value from tag
code[bytesread] = val;  //stores each value in the array
Serial.println(code);   //prints the array

This is what the daemon needs to work with. Im not sure where the data is being read wrong. Maybe characters to string doesnt work?

The error message is a null pointer exception, however if the data can be read correctly I dont think it will have this problem any longer.

Could this be a possibility?

char command[10];
  for (int i=0;i<10;i++){
     command[ i ] += myPort.readChar();
  }
45  Using Arduino / Project Guidance / Re: Arduino serproxy on: April 06, 2011, 11:03:49 am
The size of the window that the video is in is also small although I have changed   size(200, 200); to   size(400, 400);

Thank you again
Pages: 1 2 [3] 4 5