onRequest handler and Serial.print
i successful in getting nxt (using robotc) , arduino talk each other on i2c there problem hit did not expect.
i found if included serial.print statements in onrequest handler data being sent nxt master "mangled". i have confirmed saleae logic analyzer , can reproduce problem.
it appears others 'might' have had issue. when searched forum there unanswered posts people having similar problems (for example http://arduino.cc/forum/index.php/topic,90516.0.html ).
is possible update wire.onrequest library documentation page warn people issue? (or common knowledge , didn't know it?
)
thanks.
i found if included serial.print statements in onrequest handler data being sent nxt master "mangled". i have confirmed saleae logic analyzer , can reproduce problem.
it appears others 'might' have had issue. when searched forum there unanswered posts people having similar problems (for example http://arduino.cc/forum/index.php/topic,90516.0.html ).
is possible update wire.onrequest library documentation page warn people issue? (or common knowledge , didn't know it?
)thanks.
the onrequest handler (called from) isr (interrupt service routine). not recommended serial.prints inside in general, , in particular i2c because delay response possibly causing transaction time out.
you right better documented.
you right better documented.
Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > onRequest handler and Serial.print
arduino
Comments
Post a Comment