Page 1 of 1

Status on change through serial interface

Posted: Fri Dec 21, 2018 11:23 pm
by heavyrubberslave
I just played around with the serial interface of the 2B. Everything works pretty well. I can set the mode, levels, frequency und pwm.

It would be really nice if I change something on the physical controls of the 2B when a status gets written to the serial connection (the same as if I write a command to it). That way I could update my UI without polling (sending an empty command every 500ms or so to the 2B).

Does the 2B write a status on physical change or not? So far I think it doesn't but maybe I just did something wrong in my software.

Thanks for your hints and replies in advance. :D

Re: Status on change through serial interface

Posted: Sat Dec 22, 2018 10:01 am
by estim_si
No. If we did the serial link would be swamped with data.

Si


Sent from my iPhone using Tapatalk

Re: Status on change through serial interface

Posted: Sun Dec 30, 2018 8:41 pm
by estimbird
estim_si wrote: Sat Dec 22, 2018 10:01 am No. If we did the serial link would be swamped with data.
Is it possible to send something only when there is really a change on a knob / button? Or is it not possible to detect this reliably?

I ask because I have the idea in having some feedback from the box to visualize what happens at the outputs. This will be really more data to send than just knob changings. Maybe it can be achieved somehow? As far as I know, the speed of the serial connection is quite fast.

No idea if anyone else is interested in a visualization but if someone else controls the box this can be quite useful for him.

ciao
estimbird

Re: Status on change through serial interface

Posted: Tue Jan 01, 2019 12:35 pm
by admin
The detection is simple , it's the amount of data that then has to be sent over a slow serial link, and a simple adjustment of 10 to 15 would generate a change at 11,12,13,14 and 15. We've looked at various protocol changes, but since the code is designed to control the 2B, its a moot point whether you want to or can use the 2B to control external code.

Si

Re: Status on change through serial interface

Posted: Tue Jan 01, 2019 4:18 pm
by estimbird
Thank you for the explanation. Sure, I understand that it's basically just about controlling the device. Sending back any internal state like current output or mode state was only a crazy idea ... just to be curious ;)

May I ask another question about the speed of the serial link: Does the current 2B devices use 57600 baud?

Thanks again for your time.

Re: Status on change through serial interface

Posted: Tue Jan 01, 2019 6:36 pm
by estim_si
Nope they run at 9600.

And every command send is responsed to with a status string, so changes are picked up when Commander sends a command, or polls the 2B (as does E-Stim Connect)

Si


Sent from my iPhone using Tapatalk

Re: Status on change through serial interface

Posted: Tue Jan 01, 2019 8:18 pm
by estimbird
estim_si wrote: Tue Jan 01, 2019 6:36 pm Nope they run at 9600.
Oh, okay, 9600 is slow - got the point.