B4R Question rwire

whcir

Member
Licensed User
Longtime User
What is the speed of the rwire bus, 100khz? 400khz? Can the speed be changed if needed?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is set to 100khz. You can change it with inline C.

B4X:
Sub Process_Globals
   Public Serial1 As Serial
   Private master As WireMaster
End Sub

Private Sub AppStart
   Serial1.Initialize(115200)
   Log("AppStart")
   master.Initialize
   RunNative("SetWireClock", 400000) '400khz
End Sub

#if C
void SetWireClock(B4R::Object* o) {
   Wire.setClock (o->toULong());
}
#end if
 
Upvote 0
Top