grbl / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
5.42k stars 3.04k forks source link

Discrepancy sending gcode via python IDE vs a python program in cmd #1879

Open jasperzc opened 3 weeks ago

jasperzc commented 3 weeks ago

This seems like it must be an encoding issue, but when I send single-line commands to my blackbox through Python IDE the motor moves as expected; however, when I send the code as a part of a simple application (click a button to activate the function containing the exact same code), but including a "print" command to verify what is being sent, the code works and it prints what I expect but the motor doesn't move. I'm encoding to utf-8, which is what my python IDE uses, and I've tried both keeping the 437 I get from CHCP in my CMD and changing it to 65001 with the exact same outcome. Any suggestions.?.