Hello,
I have a system that is supposed to read angles from encoders. Attached to each encoder is one slave who is supposed to send the information of the angle to the master. At the beginning of the work 3 slaves were connected to the master and my code worked well. But now I connected a total of 9 slaves to it and I had a communication problem between the master and the slaves. I do not understand why in the beginning the code worked and there was communication between the components and now not.
When I open the Arduino print window sometimes there is Error Wire 2 and sometimes there is Error Wire 4 - each time there is a different note and sometimes it manages to get information from some of the slaves. When the errors appear in the value of the angle there is 0.
- I checked all the slaves and they all manage to read the angle from the encoder connected to them.
- I checked the master and it works, both it and the slaves get enough electrical voltage.
- There is no shortage in the system, and all hardware components work.
I use teensy 3.2 and 3.5.
Code Master's - I added 3 more slave addresses to this code work (9 in total): https://github.com/shmulike/robot_snake_10/blob/master/Arduino/sketches/RLS_encoder_read_master/RLS_encoder_read_master.ino
Code for the slave: https://github.com/shmulike/robot_snake_10/blob/master/Arduino/sketches/RLS_encoder_read_slave/RLS_encoder_read_slave.ino
I would be very happy if you could help me understand what the problem is!
I have a system that is supposed to read angles from encoders. Attached to each encoder is one slave who is supposed to send the information of the angle to the master. At the beginning of the work 3 slaves were connected to the master and my code worked well. But now I connected a total of 9 slaves to it and I had a communication problem between the master and the slaves. I do not understand why in the beginning the code worked and there was communication between the components and now not.
When I open the Arduino print window sometimes there is Error Wire 2 and sometimes there is Error Wire 4 - each time there is a different note and sometimes it manages to get information from some of the slaves. When the errors appear in the value of the angle there is 0.
- I checked all the slaves and they all manage to read the angle from the encoder connected to them.
- I checked the master and it works, both it and the slaves get enough electrical voltage.
- There is no shortage in the system, and all hardware components work.
I use teensy 3.2 and 3.5.
Code Master's - I added 3 more slave addresses to this code work (9 in total): https://github.com/shmulike/robot_snake_10/blob/master/Arduino/sketches/RLS_encoder_read_master/RLS_encoder_read_master.ino
Code for the slave: https://github.com/shmulike/robot_snake_10/blob/master/Arduino/sketches/RLS_encoder_read_slave/RLS_encoder_read_slave.ino
I would be very happy if you could help me understand what the problem is!