Updated Python API for E-stim 2B

The place for discussion about 3rd party software and hardware for the 2B. Post in the board for support and questions. Please NOTE support for 3rd party software and hardware is only available from the authors. Appearance of products or posts in this section does not imply any endorsement or connection (formal or informal) with E-Stim Systems Ltd. Use of such items may invalidate your 2B guarantee.
Forum rules
Please NOTE support for 3rd party software and hardware is only available from the authors.

Appearance of products or posts in this section does not imply any endorsement or connection (formal or informal) with E-Stim Systems Ltd. Use of such items may invalidate your 2B guarantee.
JerryLee06
Active
Posts: 13
Joined: Sun Dec 09, 2018 9:32 am
Location: Germany

Re: Updated Python API for E-stim 2B

Post by JerryLee06 » Fri Jan 11, 2019 3:01 pm

First step is done.
I installed Version 2.7



birdburdy
Active
Posts: 143
Joined: Mon Aug 11, 2008 6:58 pm

Re: Updated Python API for E-stim 2B

Post by birdburdy » Fri Jan 11, 2019 6:08 pm

JerryLee06 wrote:
Fri Jan 11, 2019 3:01 pm
First step is done.
I installed Version 2.7
Ok cool, now install the estim2bapi according to the online instructions on github. (pip install ...)

Then you should be able to do "import estim2" from within python.
Unofficial Python API for the E-Stim 2B: https://github.com/fredhatt/estim2bapi
Generating sounds in Python: https://github.com/fredhatt/estimsoundsynth

JerryLee06
Active
Posts: 13
Joined: Sun Dec 09, 2018 9:32 am
Location: Germany

Re: Updated Python API for E-stim 2B

Post by JerryLee06 » Fri Jan 11, 2019 8:45 pm

Ok cool, now install the estim2bapi according to the online instructions on github. (pip install ...)

done....

Then you should be able to do "import estim2" from within python.

but how can I import it? With which command?

birdburdy
Active
Posts: 143
Joined: Mon Aug 11, 2008 6:58 pm

Re: Updated Python API for E-stim 2B

Post by birdburdy » Sat Jan 12, 2019 12:06 pm

JerryLee06 wrote:
Fri Jan 11, 2019 8:45 pm
Ok cool, now install the estim2bapi according to the online instructions on github. (pip install ...)

done....

Then you should be able to do "import estim2" from within python.

but how can I import it? With which command?
You'll need to run Python in a command line. Not sure how to do that in Windows as I haven't used it in about 15 years.
Unofficial Python API for the E-Stim 2B: https://github.com/fredhatt/estim2bapi
Generating sounds in Python: https://github.com/fredhatt/estimsoundsynth

JerryLee06
Active
Posts: 13
Joined: Sun Dec 09, 2018 9:32 am
Location: Germany

Re: Updated Python API for E-stim 2B

Post by JerryLee06 » Sat Jan 12, 2019 4:29 pm

ok thx for your help.

No one other who could tell me with which command i can do this under W7 64?

birdburdy
Active
Posts: 143
Joined: Mon Aug 11, 2008 6:58 pm

Re: Updated Python API for E-stim 2B

Post by birdburdy » Sat Jan 12, 2019 6:10 pm

JerryLee06 wrote:
Sat Jan 12, 2019 4:29 pm
ok thx for your help.

No one other who could tell me with which command i can do this under W7 64?
Try something like this: https://www.youtube.com/watch?v=mXXlt9bFIuI
Unofficial Python API for the E-Stim 2B: https://github.com/fredhatt/estim2bapi
Generating sounds in Python: https://github.com/fredhatt/estimsoundsynth

JerryLee06
Active
Posts: 13
Joined: Sun Dec 09, 2018 9:32 am
Location: Germany

Re: Updated Python API for E-stim 2B

Post by JerryLee06 » Sat Jan 12, 2019 6:33 pm

I tried it for 4-5 hours. Seems that this would not be my world.

Sadly I don´t get it to run.

Seems I don`t know enough for that.

I tried many ways, but I always get errors.

estimbird
Active
Posts: 28
Joined: Tue Aug 28, 2018 7:48 pm
Location: Germany

Re: Updated Python API for E-stim 2B

Post by estimbird » Sat Jan 12, 2019 8:12 pm

I do not use windows but maybe I can help a little bit.

You have to find out to which port the serial link is connected, eg. COM3

Maybe this can help: http://www.cropscan.com/serialusb.html

If you know the port create a py script / file eg. "2bstatus.py":

Code: Select all

# import the module and connect to 2B connected
import estim2b
e2b = estim2b.Estim('COM3')
# get status from 2B...
e2b.status()
Instead of COM3 use the port on your system.

Then run it - see https://www.pythoncentral.io/execute-py ... ile-shell/

Code: Select all

C:\Python27\python.exe C:\Users\Username\Desktop\2bstatus.py

JerryLee06
Active
Posts: 13
Joined: Sun Dec 09, 2018 9:32 am
Location: Germany

Re: Updated Python API for E-stim 2B

Post by JerryLee06 » Sun Jan 13, 2019 11:14 am

thx to all!

I got it. I made a very stupid mistake, but now I got it.

birdburdy
Active
Posts: 143
Joined: Mon Aug 11, 2008 6:58 pm

Re: Updated Python API for E-stim 2B

Post by birdburdy » Sun Jan 13, 2019 12:46 pm

estimbird wrote:
Sat Jan 12, 2019 8:12 pm

Code: Select all

# import the module and connect to 2B connected
import estim2b
e2b = estim2b.Estim('COM3')
# get status from 2B...
e2b.status()
Instead of COM3 use the port on your system.
Oh, what's the default port that the 2B gets assigned on Windows? I'll add this as an autodetect.
Unofficial Python API for the E-Stim 2B: https://github.com/fredhatt/estim2bapi
Generating sounds in Python: https://github.com/fredhatt/estimsoundsynth

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests