Evening from Aus (1.33AM),
I would like some help on the following. I am attempting to create direct wireless stepper motor control via:
- 28BYJ-48 stepper motor and U0003 motor controller
- 2 x nrf24L01 2.4ghz cards
- 1 arduino mega and 1 uno
The intention is to mount this to my super fine focus on my telescope as adjusting the focus while zoomed into Jupiter makes the image shake uncontrollably.
I have some experience with arduino before and have managed to put the hardware together, however, I am struggling with the programming side of things. After trawling the internet and other people's projects and codes, I have managed to achieve the following:
- Transmitter to send a number based on the position of the rotary encoder
- Receiver to receive that number. (confirmed via serial monitor)
I'm struggling to convert the series of numbers into 1 step movements for the stepper motor.
Refer attached for my code - any help would be much appreciated.
Also, if you could explain in the receiver (numbers only) code, what does this bit actually do - i.e. how does it grab a number from what is sent across?
struct package
{
int id=0;
};
byte addresses[][6] = {"0"};
Any help would be much appreciated.
Regards,
Rog.
transmitter.ino (1.18 KB)
receiver (numbers only).ino (589 Bytes)
receiver_motor.ino.ino (2.29 KB)