Android Question Flash single pulse

anallie0

Active Member
Licensed User
Longtime User
hi
I need to take a pulse with LED flash camera. Anyone have any idea how to get it. I have to set the time duration between on and off?
 
Hello,
you can use the cameraEx class (https://www.b4x.com/android/forum/t...tends-the-camera-library-functionality.23801/) and then use something like this together with a timer:

Code: Copy
Sub Camera1_Ready (Success As Boolean)
    If Success Then
        camEx.SetJpegQuality(90)
        Log(camEx.GetSupportedFlashModes) 'here check first which modes are supported
        camEx.SetFlashMode("torch") 'will turn it on into torch mode
        camEx.CommitParameters
        camEx.StartPreview
       
       
       
        Log(camEx.GetPreviewSize)
    Else
        ToastMessageShow("Cannot open camera.", True)
    End If
End Sub
 
Upvote 0
Back
Top