Show Posts
Pages: 1 [2] 3 4 ... 10
16  Development / Other Software Development / Running into issues when I compiled IDE on: January 06, 2014, 06:22:17 pm
I'm running into issues with Serial Monitor.
I've compiled the IDE from the source code with the latest patch from branch ide-1.5.x
https://github.com/arduino/Arduino/commit/4e262a566ddb0298fe490571ce4a137dae8c49c2#diff-e64a621bd46a38a00e581319169f83af
Everything works, except the Serial monitor that gives me an null exception when it receives data.
I started a thread here before:
http://forum.arduino.cc/index.php?topic=205877.msg1514910#msg1514910
If anyone has any pointers to give me, please let me know.
Is it related to RXTX removal and inclusion of JSSC??

Thank you,
RI
17  Products / Arduino Due / EthernetUtils libraries on: January 02, 2014, 06:37:25 pm
Hi,

I'm trying to use stonehippo's library in a Due board.
https://github.com/stonehippo/arduino-ethernet
It gives me some error on casting conversion.
D:\Dropbox\Arduino\libraries\EthernetUtils\utility\EthernetCompat.cpp: In function 'void ethernet_compat_write_data(int, uint8_t*, uint8_t*, uint16_t)':
D:\Dropbox\Arduino\libraries\EthernetUtils\utility\EthernetCompat.cpp:98: error: cast from 'uint8_t*' to 'uint16_t' loses precision
D:\Dropbox\Arduino\libraries\EthernetUtils\utility\EthernetCompat.cpp: In function 'void ethernet_compat_read_data(int, uint8_t*, uint8_t*, uint16_t)':
D:\Dropbox\Arduino\libraries\EthernetUtils\utility\EthernetCompat.cpp:125: error: invalid conversion from 'uint8_t*' to 'uint16_t'
D:\Dropbox\Arduino\libraries\EthernetUtils\utility\EthernetCompat.cpp:125: error:   initializing argument 2 of 'void W5100Class::read_data(SOCKET, uint16_t, volatile uint8_t*, uint16_t)'

The function that generates the error is this with the red line being the error:
void ethernet_compat_write_data(int socket, uint8_t* src, uint8_t* dst, uint16_t len)
{
   uint16_t size;
   uint16_t dst_mask;
   uint16_t dst_ptr, dst_ptr_base;

   dst_mask = (uint16_t)dst & SMASK;
   dst_ptr_base = TXBUF_BASE + socket * W5100Class::SSIZE;
   dst_ptr = dst_ptr_base + dst_mask;

   if( (dst_mask + len) > W5100Class::SSIZE )
   {
         size = W5100Class::SSIZE - dst_mask;
     ethernet_compat_write_private(dst_ptr, (uint8_t *) src, size);
     src += size;
           ethernet_compat_write_private(dst_ptr_base, (uint8_t *) src, len - size);
   }
   else
     ethernet_compat_write_private(dst_ptr, (uint8_t *) src, len);
}

Can anyone point me in the right direction on how to change it, so it would work?

Thanks,
RI
18  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
19  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
20  Using Arduino / Installation & Troubleshooting / Re: HELP!!! Arduino IDE will not start!! on: December 19, 2013, 07:46:57 pm
What was the problem?
21  Using Arduino / General Electronics / Re: Connector ID on: November 26, 2013, 01:05:10 am
Thanks!!!
22  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
23  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
24  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
25  Using Arduino / Programming Questions / Re: Help with optimizing code on: September 18, 2013, 06:39:03 pm
@int2str
Definitely the winner smiley
26  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.
27  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
28  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.
29  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.
30  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?
Pages: 1 [2] 3 4 ... 10