I’ve done the whole microscope, but I still have a problem with the motors, they make a noise as if they are moving, but they are not moving … I don’t know what the problem is, because I tested it one by one with a different code (simple test simple test that moves the motors right and left) and they move, but when I put the sangaboard code on the arduino it doesn’t move, they just makes the noise like I said above.
Sorry about that. Just to check this is the nano-version with the 3 daughter boards? Are you comfortable trying to communicate with them by python? It may be worth putting the sangaboard firmware back on the nano with the Arduino IDE and then installing this library into Python:
And then trying to run the following script:
from sangaboard import Sangaboard
with Sangaboard() as sb:
sb.move_rel([1000,0,0])
So, I’m using the arduino nano with the stepper motor drivers. I just loaded the code on the Arduino and connected it on the raspberry, but to be honest I’m not sure how to use this phyton version you’re talking about, I just installed the library by “pip install sangaboard” on raspberry pi terminal… if you can help me with more details on how to run this script I would appreciate it
Sorry.
Try opening the pi terminal and running:
pip3 install sangaboard
If that gives no errors then run:
python3
Now your terminal is in Python3 and you should be able to run the 3 commands above you can just type them in one by one and pressing enter. Making sure that you have the spaces at the start of the line for sb.move_rel([1000,0,0])
Once you enter the 3rd command the x motor should spin.
I’ve done the whole process now, but in the end it gives an “expected indented block” error!? Do you know why?! motor test|683x481
Indentation spaces are necessary in Python syntax. In the post from JS he says to make sure there are spaces at the beginning of the sb.move line
My fault… but i tested with the space and the motors still not moving. I’m really desperate because I don’t know what can be causing this problem anymore
I don’t know why but the problem was on the Arduino NANO, I just switched to UNO and now it’s working perfectly… Thank’s for help
Ah yeah there have been some intermittent issues with nano’s. I am not sure what causes it Glad it is working now