Status on change through serial interface

The most versatile and user friendly E-Stim control unit available today. If you want More Power, More Control, and more fun, then the 2B is the one you want.
Post Reply
heavyrubberslave
Active
Posts: 5
Joined: Sat Dec 01, 2018 12:56 pm
Location: Zurich, Switzerland

Status on change through serial interface

Post 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


User avatar
estim_si
Staff
Posts: 349
Joined: Tue Feb 19, 2008 11:23 pm
Location: Watford
Contact:

Re: Status on change through serial interface

Post by estim_si »

No. If we did the serial link would be swamped with data.

Si


Sent from my iPhone using Tapatalk
estimbird
Active Developer
Posts: 229
Joined: Tue Aug 28, 2018 7:48 pm
Location: Germany

Re: Status on change through serial interface

Post 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
User avatar
admin
Site Admin
Posts: 2100
Joined: Tue Feb 19, 2008 8:14 pm
Location: Watford,UK
Contact:

Re: Status on change through serial interface

Post 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
E-Stim Systems Ltd
estimbird
Active Developer
Posts: 229
Joined: Tue Aug 28, 2018 7:48 pm
Location: Germany

Re: Status on change through serial interface

Post 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.
User avatar
estim_si
Staff
Posts: 349
Joined: Tue Feb 19, 2008 11:23 pm
Location: Watford
Contact:

Re: Status on change through serial interface

Post 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
estimbird
Active Developer
Posts: 229
Joined: Tue Aug 28, 2018 7:48 pm
Location: Germany

Re: Status on change through serial interface

Post 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.
Post Reply