Coder Social home page Coder Social logo

Comments (17)

Git572 avatar Git572 commented on September 25, 2024 1

Send without seeing your answer first :-(
I'l try the Debug version. Thanks so much for your effort.

Good Morning Philipp,

I didn't tell the complete hardware yet: Load cell --> NAU7882 --> MCP2221 --> USB
On the old laptop where it is working there is Windows 10 professionel and USB 2.0

On the desktop computer where CriticalForce.exe does only start without sensor it's Windows 11 home. Tried USB 2.0 and 3.0.
The new user didn't help either. Using "compatibility mode Windows 8" didn't make no difference.

Best regards
Ulrich

from critical-force.

Git572 avatar Git572 commented on September 25, 2024 1

from critical-force.

OddgitHub avatar OddgitHub commented on September 25, 2024

Hi Ulrich,

thank you for your message.

Just a couple of questions:

  • Are you using the exe file to start the app (not the Python script)?
  • What hardware setup do you have (USB interface/load-cell module)? Does the MCP2221 show up in your devices as shown here:
    Hardware
  • If you're using the latest software version 1.2.1, a logfile is created in this folder:
    C:\Users\yourusername\AppData\Local\pbulling\CriticalForce\debug.log

Could you please send me this logfile? Just in case you don't see the "AppData" folder: It's a hidden folder, therefore you must enable hidden folders in the Explorer.

Best regards
Philipp

from critical-force.

Git572 avatar Git572 commented on September 25, 2024

Hi Philipp,
thanks for your quick response.
Yes, I use the exe-file. I saw today, that you launched a new version and tried it before starting the issue. The log is touched when starting CriticalForce.exe with or without sensor (timestamp gets updated) but stays empty anyway.
debug.log

The MCP2221A gets recognised and listed as I plug it in.
grafik

I had the opportunity to try it on an old laptop. Where everything works fine.
I'll test to start it in a new account tomorrow.

Best regards
Ulrich

from critical-force.

OddgitHub avatar OddgitHub commented on September 25, 2024

Hi Ulrich,

okay, good to hear that the hardware is working with an other laptop. This means that it's unlikely to be a hardware issue.

Are both laptops you've tried running Windows 11? To be honest, I've only tried it on Windows 10 so far.

I've build a Debug version of the application. This is exactly the same software as version 1.2.1, except that a terminal opens as soon as the app is started. Could you please check, if there are any error messages shown in the terminal?
Critical Force Debug Version

Thanks a lot for your effort and sorry for the inconvenience.

Best regards
Philipp

from critical-force.

Git572 avatar Git572 commented on September 25, 2024

Hi Philipp,

I'm doing now everything with your Debug version on Windows 11. Not depending if the sensor is plugged in the debug.log always gets touched but stays empty.

Starting with sensor attached:
debug.log gets touched, terminal is opening, blinking cursor but nothing else
Task-Manager shows two background processes of the CriticalForce_DEBUG.exe. One with 2.1 MB RAM usage and on with ~54 MB RAM usage.
waited for five minutes
After closing the terminal the bigger background process stays alive and I can't kill it within the task manager.
Everything reproducible.

Starting without sensor attached:
app starts immediately, process is listed as "App", and there is one background process. Both closing when closing the app.

Started out of a terminal with ".\CriticalForce_DEBUG.exe" the results are the same.

I compared it with the old laptop with windows 10. Here are, as you will know, a background process and one foreground process. Both of them terminating when closing the app.

Best regards
Ulrich

from critical-force.

OddgitHub avatar OddgitHub commented on September 25, 2024

Hi Ulrich,

that is very strange. I've got no idea, whats happening here. I've built another debug version, where I've manually added some print statements. Ideally, the terminal output should look like this:
Terminal

Could you please tell me, up to which comment/number it is working for you?

Best regards
Philipp

from critical-force.

Git572 avatar Git572 commented on September 25, 2024

Hi Philipp,

sorry, was getting home late yesterday.
Just tested your new debug version 2.
grafik

As you can see, it stopped after "02 - Import board".
I could see the device (MCP2221) in the device list, but it disappears for a split second, when I start the CritiicalForce_DEBUG2.exe right after the messages come visible in the terminal.

Best regards
Ulrich

from critical-force.

OddgitHub avatar OddgitHub commented on September 25, 2024

I think that the device disappears should be no problem, this also happens on my computer.

Unfortunately, I've got no idea, whats happening here. You said, the NAU7802 is connected to the MCP2221 via the Qwiic connector and the setup is working fine on an other computer?

from critical-force.

Git572 avatar Git572 commented on September 25, 2024

Hi Philipp,

sorry, was getting home late yesterday.
Just tested your new debug version 2.
grafik

As you can see, it stopped after "02 - Import board".
I could see the device (MCP2221) in the device list, but it disappears for a split second, when I start the CritiicalForce_DEBUG2.exe right after the messages come visible in the terminal.

Best regards
Ulrich

from critical-force.

Git572 avatar Git572 commented on September 25, 2024

Hi Philipp,

the Sensor is this one
then comes the "Adafruit NAU7802 24-Bit ADC Compatible with Arduino STEMMA QT Qwiic 4538"
Connected via: SF14426 SparkFun 4pin 1mm pitch JST Qwiic Cable - 50mm QITA Angebots-Nr.: 353139031770
to the "Adafruit MCP2221A Breakout - General Purpose USB zu GPIO ADC I2C"

and yes, it works o.K. on my old laptop with windows 10, which is nearly used to capacity just running windows :-)

Do you think it would help anything to run the debug version from source per "python start.py"? The normal v1.2.1 didn't give any output on the terminal (but I think that's how it is written).

Best regards
Ulrich

from critical-force.

OddgitHub avatar OddgitHub commented on September 25, 2024

Yes, it could be helpful, if you would run the app directly as Python script. Are you familiar with Python?

from critical-force.

Git572 avatar Git572 commented on September 25, 2024

I started a little bit into python a few years ago. To say I'm familiar would be to much. But it's an object orientated language - I'll try my best :-)
So far, I installed Visual Studio on the Computer with Windows 11 and "run" the program line by line.
It stops in sensor.py at line 48 trying to execute import board. Which is an external python module as an inerface for the arduino, if I got this right.

I'd say, tell me what you need / want me to do and I can tell you if I'm familiar enough :-)

P.S. Running scripts from a terminal would be also o.K. for me, I'm not glued to Visual Studio.

from critical-force.

OddgitHub avatar OddgitHub commented on September 25, 2024

The problem is that "import board" loads an external module. So it seems to be a problem with the MCP2221A, not with the Critical Force software itself. Not sure, how we can debug this.

One issue could be, that setting the Environment Variables fails. You could open a terminal and navigate to the folder with the "start.py" script.

Then type the following in the command line:
set BLINKA_MCP2221=1

Next start the script with
python start.py

If that doesn't help, you could check out this documentation, on how to setup the MCP2221A

from critical-force.

Git572 avatar Git572 commented on September 25, 2024

Setting the BLINKA_MCP2221 to 1 didn't help.
I added a line to sensor.py
print(os.environ['BLINKA_MCP2221'])
right bevor the
import board
which gives me (in a new opened terminal)
>python3 start.py
01 - Set environment variable
02 - Import board
1
So the BLINK_MCP2221 is set alright.

O.k. going to your link:
> set BLINKA_MCP2221=1
> python
>>> import hid
>>> hid.enumerate()
[long list with the MCP2221 in it]
>>> device = hid.device()
>>> device.open(0x04D8, 0x00DD)
>>> import os
>>> os.environ["BLINKA_MCP2221"]
'1'
>>> import board

here comes one beep upper->lower, then lower->upper, then the console stops and isn't accessible any more.
The same happens trying to import digitalio.

from critical-force.

OddgitHub avatar OddgitHub commented on September 25, 2024

Okay, thanks for trying this.

Unfortunately, I'm afraid that I'm not able to help you. It seems to be a problem with the MCP2221A.

Could you maybe post your problem in the adafruit forum?

from critical-force.

Git572 avatar Git572 commented on September 25, 2024

Sorry, I'm very bussy these days, but I will post it in the adafruit forum

from critical-force.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.