Android Question RPM meter slow (first post)

Marcelo AJL

New Member
Licensed User
Longtime User
Hi, it's my first post.


I created a simple rpm meter, where I get a bluetooth character from my arduino on a motor Hz frequency (example: 12000 rpm = 200hz = 200 characters per second). The code on arriving at any data in the serial account 1hz and at the end of 1000ms, the timer1_tick adds and shows me the frequency in hertz. For low rotations works ok, but above 100hz the application does not increase, can not process. Any idea?

B4X:
Sub AStream_NewData (Buffer() As Byte)
    
        rpm=rpm+1
    
End Sub

Sub timer1_tick
    rpm=rpm
    lblrpm.Text=rpm
    rpm=0
    

End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…