Hi,
I'm new and can't find solution.
down is my code.
Master sends movement (float) to slave arduino over I2C every few seconds (3 or more).
Data on master LCD and slave LCD is correct.
When I uncomment "myStepper.step(steps);" whole I2C bus stops.
I want to run stepper on Slave arduino for requested rotation and then to be ready for new data from master.
Arduino Uno board.
receiveMovement() is called in interrupt context, so you must not use any code that depends on interrupts to work as they are disabled in interrupt context. Serial.print{ln}() is not allowed as well as your Stepper library calls. Move that code into the loop() and set a flag variable in the interrupt handler when you received the necessary data. Variables used in the interrupt handler and outside (loop) must be declared "volatile".
Thank you!
I change code but not sure is that's it?
On LCD data is coming regulary as master sending
but my stepper is just buzzing.
I remove "Wire.end();"
What I did wrong?