You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Pi4J on a project that is using serial communications to interface Raspberry Pi with Arduino Nano.
Basic serial communications is working, but I am suffering a 52ms delay from the Raspberry Pi receiving the response back from the Arduino and the Pi4J serial library passing it on to my Java program.
I've hooked up a scope on the communications link and can see the serial data transferring from the Pi to the Arduino and the immediate response going back.
Can any one point me to where I should look to try and determine why the Java Pi software is taking so long to receive the data coming back?
Using Pi4J 1.4 on a 4B, with UART0 ("/dev/ttyAMA0") running at 115200 baud.
While waiting for data to be available on the receiving thread I am using Thread.onSpinWait() to release the processor.
Any assistance would be much appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using Pi4J on a project that is using serial communications to interface Raspberry Pi with Arduino Nano.
Basic serial communications is working, but I am suffering a 52ms delay from the Raspberry Pi receiving the response back from the Arduino and the Pi4J serial library passing it on to my Java program.
I've hooked up a scope on the communications link and can see the serial data transferring from the Pi to the Arduino and the immediate response going back.
Can any one point me to where I should look to try and determine why the Java Pi software is taking so long to receive the data coming back?
Using Pi4J 1.4 on a 4B, with UART0 ("/dev/ttyAMA0") running at 115200 baud.
While waiting for data to be available on the receiving thread I am using Thread.onSpinWait() to release the processor.
Any assistance would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions