Display Stepper Motor Position in Real Time

Thank you for your reply,

I tried 60 in the sketch, and 48 in the App, it had no effect (except that the micro stop is more often/faster).

Thanks for your proposition :slight_smile:

1 Like

Salut @Jon1 ,
si le délai est vraiment chaque 100 ms et la cause racine est vraiment le débit vers le BT, je te sugÚre d' accelerer la connexion de ton Arduino vers la carte HC05 (ou HC06?). Normalement j'utilise le baudrate @115200. Cette vitesse ne peut pas etre rejointe par la librairie Softwareserial, mais comme tu n'utilises plus le serial monitor tu peux utiliser la ligne Tx et Rx hardware (pins 0,1) qui peuvent etre utilisés à ce débit. N'oublie pas qu'il faut aussi coder le HC05 à la meme vitesse. Si tu regarde le site de @Juan_Antonio il y a beaucopu d'examples sur le sujet. Dans cette façon la vitesse de communication est 10 fois plus rapide (si maintenant ton débit est à 9600 bps). Tu peux essayer ça.
Bonne chance !
(je suis italien mais je parle un petit peux le français, mais si je n'ai pas été clair, je vais l'écrire en anglais :slight_smile: )

1 Like

That's a good idea Ugo, I already recommended shedding the burden of the Serial Monitor. Baud rate already is 115200 in the Sketch for Serial, possibly the HC05/06 has not been programmed to run @ 115200.

1 Like

Hi @Chris,
Sorry I didn't reckon that the baudrate was already @115200. I just saw that Jon was using the SoftwareSerial library. As far as I know (i.e. in my experience) that library is working erratically over 38400 bps. Moreover, probably the library is waiting for the complete buffer flush before freeing the foreground code. Maybe the HW serial is using an interrupt sequence so it is less time consuming, but, anyway, the problem is really "interesting" and "challenging"...
Best, Ugo.

2 Likes