delay in microseconds | SoloLearn: Learn to code for FREE!

0

delay in microseconds

how can i delay in microseconds in android studio?

11/4/2018 1:18:09 PM

M.I.Rayhan

3 Answers

New Answer

+1

See https://developer.android.com/reference/java/lang/Object#wait(long) for delays in milliseconds. Getting a delay in microseconds is highly improbable since android is not a hard real time operating system.

0

okay, so that's mean i can't delay in uS. Actually was trying to generate square wave sound in microseconds through my headphone jack, so that i can communicate with my microcontroller (PIC). By the way thanks for the reply :)

0

Depending on the Android device that you are using it may be possible to connect a bluetooth to serial slave port to your PIC serial port and use the Android Bluetooth classes to communicate with the PIC. See... https://developer.android.com/reference/android/bluetooth/package-summary for more information. As far as the PIC is concerned it's talking over a serial link so you don't have to implement a bluetooth library on your PIC.