Quote:
Originally Posted by zDrakon
(Strangely enough we can have Roborio send data to Arduino and Arduino read it but the Arduino can't successfully send data to the roborio with the Roborio giving a response like a System.out.println() in the DriverStation console)
|
Congrats, you've correctly set up the Arduino as a slave 🎉
In I2C, slaves can only send data for a transaction, not any time they want. For Arduino, that means you can only write in the
onRequest handler function, and only the number of bytes the master expects. On the roboRIO side, you need to call
I2C.transaction()