hi twyatt,
im using adxl 345 with ur code. but it shows magnitude 3 n likewise but 
ideally it should be 1 when accelerometer at rest.


On Saturday, July 27, 2013 1:38:02 PM UTC+5:30, Travis Wyatt wrote:
>
> When having the IOIO read/write a lot of data (currently over UART and 
> SPI) it eventually seems to deadlock. I continue to receive incoming data 
> on UART but outgoing data over UART and the SPI writeRead get stuck in a 
> wait(). This happens anywhere from 5-10 minutes of continually receiving 
> data on the UART (while at the same time reading sensor data from an 
> ADXL345). While all threads that want to write are waiting, my threads that 
> receive data continue to receive data (are not deadlocked). I'm using 
> IOIO0330.
>
> Here is the stack trace on the thread that is trying to write UART data:
>   at java.lang.Object.wait(Native Method) 
>   at java.lang.Object.wait(Object.java:358) 
>   at 
> ioio.lib.impl.FlowControlledOutputStream.write(FlowControlledOutputStream.java:76)
>  
>   at java.io.OutputStream.write(OutputStream.java:120) 
>   at java.io.DataOutputStream.write(DataOutputStream.java:99) 
>   at java.io.FilterOutputStream.write(FilterOutputStream.java:105) 
>   at 
> edu.sdsu.rocket.io.PacketOutputStream.writePacket(PacketOutputStream.java:42) 
>   at edu.sdsu.rocket.control.devices.SB70.writePacket(SB70.java:57) 
>   at 
> edu.sdsu.rocket.io.PacketMultiplexer.writePacket(PacketMultiplexer.java:33) 
>   at edu.sdsu.rocket.io.PacketMultiplexer.write(PacketMultiplexer.java:24) 
>   at 
> edu.sdsu.rocket.control.controllers.PacketController$FlushThread.run(PacketController.java:189)
>  
>   at java.lang.Thread.run(Thread.java:1019) 
>
> And then the stack trace of the thread that is trying to read my ADXL345 
> accelerometer:
>   at java.lang.Object.wait(Native Method) 
>   at java.lang.Object.wait(Object.java:358) 
>   at ioio.lib.impl.SpiMasterImpl$SpiResult.waitReady(SpiMasterImpl.java:58) 
>   at ioio.lib.impl.SpiMasterImpl.writeRead(SpiMasterImpl.java:119) 
>   at ioio.lib.impl.SpiMasterImpl.writeRead(SpiMasterImpl.java:155) 
>   at edu.sdsu.rocket.control.devices.ADXL345.read(ADXL345.java:246) 
>   at edu.sdsu.rocket.control.devices.ADXL345.loop(ADXL345.java:272) 
>   at 
> edu.sdsu.rocket.control.devices.DeviceRunnable.run(DeviceRunnable.java:20) 
>   at java.lang.Thread.run(Thread.java:1019) 
>
> The project is open source and can be found at:
> https://github.com/twyatt/sdsu-rocket
>
> I know having a snippet of code to test against would make this easier to 
> debug but I was just hoping that maybe it was something obvious that I am 
> overlooking. If needed, I'll try to put together code that reproduces the 
> issue (outside of our project) but some of the setup of the project might 
> be fairly unique to our setup (i.e. we are using a NetBurner SB70LC to 
> transfer data to the IOIO's UART via ethernet).
>
> Any help would be greatly appreciated.
> -Travis
>

-- 
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/d/optout.

Reply via email to