ScienceMode / ScienceMode4_python_wrapper

Python wrapper for the ScienceMode 4 protocol
MIT License
1 stars 4 forks source link

Example code running successfully but showing red light when getting current data #2

Open angie906 opened 5 months ago

angie906 commented 5 months ago

Hello, I tried to run simple_ml_example.ipynb and p24_example1.py while connecting with p24 device but observed red light and could see the error printed when it goes to the loop related to ml_get_current_data function. The device never showed yellow light. It was showing green light until the ml_get_current_data function, changed to red and back to green when stopping or closing the serial port.

I have tried with the ScienceMode PC-Software and was able to see the yellow light coming in.

Currently, I wanted to change the code to fit our experiment, but whenever I tried to stimulate(send the current signal) it failed.

I hope you could give an advice on this issue or any possible solutions to try out. It seemed to be that device itself is not the problem, so I've been wondering if I have to modify ml_get_current_data(if it's there) in the .dll files to fix the problem.

Thank you very much in advance.

angie906 commented 5 months ago

That I tried again,

when I tried p24_example1.py code : 1) showing "red light" when smpt_send_ll_channel_config line is running(though it shows "True") 2) showing "red light" and changes to "blinking green light" when smpt_send_ml_get_current_data(also shows "True") 3) other lines of code showing "green light"

also when I tried with simple_ml_example.ipynb : showing "red light" and printing "Error on channel"

HolgerNahrstaedt commented 5 months ago

Hello @angie906 , in the current commit 5471171 I improved the naming of the example.

There are now examples for only one stimulation channel and for all 8 stimulation channel.

Previously, you could only run the example when all 8 stimulation channels were connected (otherwise there is a electrode error with a red LED). Now you can connect only the first channel to a load, and you can now run the one_channel examples. Hope this helps.

Best regards Holger

angie906 commented 4 months ago

Everything including eight channels and one channel is working from your commit now. [5471171] Thank you very much for your help!