Hey!
You are treating as if the transaction method is plainly a Boolean but instead you should treat it like if its a method.
Try taking a look at our code that is on our repo, which accomplishes this very function.
The repo is here:
https://github.com/FRC-Team-1403/RioDuinoIMUCode
-axton900