Show Posts
Pages: 1 [2] 3 4 ... 10
16  Development / Other Software Development / Re: Exception when using Serial monitor on: December 20, 2013, 09:10:11 pm
I used the branch ide-1.5.x that I pulled today.
I have made a few changes to Sketch.java, but it is unrelated to the issue.
My latest pull was a while ago on 1.5.3 version and the serial monitor was working fine.
I did notice there was a change from RXTX to jSSC that was reverted back, but there was no comments and I didn't quite understand why it was introduced and then reverted back.
Maybe it has something to do with this problem I'm getting.
You can see the history of the file here:
https://github.com/arduino/Arduino/commits/ide-1.5.x/app/src/processing/app/Serial.java
17  Development / Other Software Development / Exception when using Serial monitor on: December 20, 2013, 08:04:22 pm
Hi All,

I have compiled the Arduino IDE from the source code I pulled today.
Everything compiled fine and works as far as compiling and uploading codes.
All the menus and windows are opening up just fine.
The only issue I'm getting is when I try using the Serial Monitor window and I receive serial data.
It accepts a few bytes and then raises an exception:
Quote
Exception in thread "EventThread COM29" java.lang.NullPointerException
   at processing.app.Serial.serialEvent(Serial.java:176)
   at jssc.SerialPort$EventThread.run(SerialPort.java:1096)
The line in question is this:
https://github.com/arduino/Arduino/blob/ide-1.5.x/app/src/processing/app/Serial.java#L176
Code:
        byte[] buf = port.readBytes();
        if (buf.length > 0) {
The function readBytes is here:
https://github.com/arduino/Arduino/blob/ide-1.5.x/app/src/processing/app/Serial.java#L248
Code:
  public synchronized byte[] readBytes() {
    if (bufferIndex == bufferLast) return null;

    int length = bufferLast - bufferIndex;
    byte outgoing[] = new byte[length];
    System.arraycopy(buffer, bufferIndex, outgoing, 0, length);

    bufferIndex = 0;  // rewind
    bufferLast = 0;
    return outgoing;
  }

So, there is a possibility the function would return null if this statement is true:
Code:
    if (bufferIndex == bufferLast) return null;

I think this is what is causing my exception.
Would this be a bug or something in my compilation that went bad?

Thanks,
RI
18  Using Arduino / Installation & Troubleshooting / Re: HELP!!! Arduino IDE will not start!! on: December 19, 2013, 07:46:57 pm
What was the problem?
19  Using Arduino / General Electronics / Re: Connector ID on: November 26, 2013, 01:05:10 am
Thanks!!!
20  Using Arduino / General Electronics / Connector ID on: November 26, 2013, 12:29:34 am
Can anyone ID this connector?
Any part number, manufacturer, place to purchase would help.





Thank you,
RI
21  Using Arduino / Project Guidance / How to perform a non-blocking ethernet client connection? on: September 22, 2013, 05:11:58 pm
Hi,

I'm trying to find out if it is possible to have a non-blocking ethernet client connection to a server.
The problem I have is that the call client.connect() blocks the code and I can't process anything else until the connection is established or times out.
The timeout is quite long and if the server is down, the code is blocked for a long time.

Thank you,
RI
22  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 19, 2013, 10:16:47 am
Well, I already have devices that are being used that uses the soft SPI.
The HW SPI can be used just fine for new boards, but it will only work on new boards and it will definitely not be backward compatible.
So, I implemented a #define that switches between HW and SW SPI depending on the type of board and will make the revision to HW SPI on future boards.
This way, I can improve the experience on the old boards and provide a better solution for new ones.
I really appreciate the help smiley
23  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 18, 2013, 06:39:03 pm
@int2str
Definitely the winner smiley
24  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 18, 2013, 10:23:53 am
Wow!!
Thanks smiley
I'll try that one.
25  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 17, 2013, 10:12:30 pm
Oh, I had no doubts that it worked. Like I said, a while back I did try using hardware spi, but hadn't seen much change, but I cut some traces on my board and did a couple air wires to get the hardware spi traces to make a comparison.
It did improve quite substantially  smiley
26  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 17, 2013, 08:37:31 pm
It was used on nokia 6100 phones and has phillips driver pcf8833.
27  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 17, 2013, 08:05:13 pm
nope.
Not really much change.. a couple milliseconds.
28  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 17, 2013, 07:05:06 pm
sketch_sep17a:52: error: assignment of read-only parameter 'b'
Why did you turn all functions const?
Is it optimized better if they are const?
29  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 17, 2013, 06:09:01 pm
It's one of those small Nokia LCD screens.
I know... unusual, but they use 9-bit SPI smiley-sad
I would hate to change my hardware at this point.
30  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 17, 2013, 05:42:49 pm
I did try the hardware SPI way back then, but this is a 9-bit SPI, so in order to make it work, I need to send the 1st bit manually and then shift the rest of the 8bit through hardware SPI.
In order to manually use MOSI and SCLK pins, I have to set SPCR=0, manipulate the pin status, sett SPCR=50 and shift the bits through hardware SPI, which at the end of the day, was takes just as long if not longer.
I'm going to scope the soft SPI when I get home.
Pages: 1 [2] 3 4 ... 10