Open nenp93 opened 10 months ago
Hello,
It looks like in your example there's a space between args.csv
and .name
. I think removing that space should fix the error, but let me me know if that's not the case.
It doesn't look like that space is in the original file:
Hello,
thanks for the fast respond. To my shame it was the space. I don't know how it went there. The next error is: line 74, in
My arduino is connected with COM 3. Could you please help me again?
with best regards
In Python strings need to be enclosed in single or double quote characters like:
s.port = "COM3"
Otherwise the program would think that "COM3" is a variable. Btw if you take a look at the arduino_serial.py example, it automatically finds a port with "arduino" in its name, if multiple ports like that are found then it lets the user to select which one to use.
Allright it worked. But the next issue is right around the corner. Independant which USB port from my Arduino Due I am using, the command window doesn't receive or doesn't print the data. After I run the command, it looks like on the screenshot and I can only close the window. I can't type anything.
Is Arduino Due running the reading_from_computer_python.ino example?
yes
It looks like the reading_from_computer_python.ino example has a bug that only happens when clock of the board is too fast.
A quick workaround would be to replace this line:
cp << Serial.read();
with this line:
cp << Serial.readString();
I'm going to fix it properly in the future
unfortunately the quick workaround does'nt solve the problem. I will keep on trying.
I modified the reading_from_computer_python.ino example and added the new one reading_from_computer_python_row_by_row which should use much less memory.
Hello, I'm completely new to arduino and python. I need to give my arduino due coordinates from a csv file, which a programs creates on my pc. The arduino is used to controll a robot arm. I'm trying to dive in arduino an python programming and tried to run the example ,,reading_from_computer_python''. I copied the sketch for arduino and uploaded it successfully. When I try to run python --csv hurricanes-csv in the command window on my pc, the following error occures: line 42, in
with open(args.csv .name, 'rb') as f:
^^^^^^^^
AttributeError: 'Namespace' object has no attribute 'csv'. Did you mean: 'csv '?
What am I doing wrong?