Theensy3.2 I2C getting wront values from slave

Status
Not open for further replies.

shmulik

Member
Teensy3.2 I2C master getting wrong values from slave

Hi guys,

I have a problem about chaining 2 Teensy3.2 via I2C
The master requesting a float number from the salve.
The slave is connected to an encoder:
https://www.rls.si/en/products/rotary-magnetic-encoders/absolute-encoders/aksim-2-off-axis-rotary-absolute-encoder

I wrote the header files by myself for communicating between Teensy and the encoder.
The encoder connected to the slave teensy via serial2.
when I plug the slave to PC I see the right values being read from the encoder and printed in the Serial-Monitor.
But when I plug the master, it always receiving the value of 0.0
Thanks for your help

My header files:
https://github.com/shmulike/testing/tree/master/RLS_Encoder
Master:
https://github.com/shmulike/testing/blob/master/basic_master/basic_master.ino
Slave:
https://github.com/shmulike/testing/blob/master/basic_slave/basic_slave.in
 
Last edited:
Status
Not open for further replies.
Back
Top