data logging using usb connection [solved: need R3 firmware]

Started by elirann, January 02, 2022, 08:32:16 AM

elirann

Hello,

I'm a new Current ranger user. I was trying to connect the current ranger to my
laptop via usb and get the current samples \ current reading from a simple circuit I made.

With Python script I used from here:

https://github.com/MGX3D/CurrentViewer

I was trying to send this command to the Terminal:

python current_viewer.py -p COM21

But I'm getting an error (GUI failed to load):
"...Fatal: Could not connect to USB/BT COM port COM21. Check the
logs for more information"

Does anyone know why I can't connect to the port and the GUI failed to load?

I checked my port number and it's correct. I also tried to use other micro-usb cable
and it didn't help. (By the way the current samples can be seen on the OLED just fine)
I connected the USB cable through USB-Isolator.

Any tips or simple guide to record the current data over time?
Even with Arduino in someway? (I don't have the Bluetooth module so I didn't try it yet)
I'm a completely new with this device.

Thanks in advance.

Felix

#1
I should note that I have not created the software but I can try to answer questions.
You will need python3, see the docs. For instance I have both python 2 and 3 so calling python invokes python2, instead I need to call python3 or current_viewer will fail.

For logging, the device outputs a serial stream, which you can consume in whatever way you'd like, you are not restricted to one tool or another.

elirann

Hey,

I have already tried to run the script as I mentioned (On Python3).
But I have an error. Can you please be more specific with your reply?

Thanks again

Felix

If calling python invokes python3 then you're OK.
The way you're using the command seems correct. Why it won't work I do not know. Try lower capitals, "com21".

elirann

Thanks I finally solved it by updating the firmware to CurrentRanger_R3.
CurrentRanger_R1 probably not supporting it.

Felix

Ah yes!
That's an important detail. R1 was not yet that advanced to include the logging formats required by CurrentViewer.
Thanks for the update.