There are two pieces of code here, the IOIO code and your PIC code. The IOIO code has been rigorously tested. I'm not saying it is impossible that there is a bug there, but it is not very likely that this basic use-case is not working.
Your Java code looks OK. You can do a loopback test (connect MISO and MOSI together, see what you get back) to convince yourself that the IOIO is sending the entire message, or otherwise look with a scope / logic analyzer. I would be more suspicious of the custom PIC code. On Wed, Feb 19, 2014 at 7:56 AM, Aaron Lim <[email protected]> wrote: > ok, a PIC is connected to the IOIO through SPI, i create a button on the > Eclipse side to call the writeRead() and print the value of response when > clicked and the pic would capture the data from the spi and display on the > 8 led, i assign 2 different value,15 and 40 to the request array and the > pic will capture the 2 value, store it in a variable and toggle the led for > a second between the 15 and 40, this is what i expected to see. instead the > pic only take the 1st value for both of the variable and the led did not > toggle, they stay constant to represent the value 15, when i clicked the > button second time the value printed out are 15 so i am thinking the second > byte did not pass through, and the value of first byte stay in the PIC > buffer are sent back as response > > -- > You received this message because you are subscribed to the Google Groups > "ioio-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/ioio-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "ioio-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/ioio-users. For more options, visit https://groups.google.com/groups/opt_out.
