Closed CidrolinF closed 5 years ago
Allright, I solved the communication issue by inverting the RTS state at the serial port initialization. It works fine now. I don't know if it is specific to my controller BSC201.
In port.py :
self._serial.setRTS(0) time.sleep(0.05) self._serial.reset_input_buffer() self._serial.reset_output_buffer() self._serial.setRTS(1) time.sleep(0.05)
It works fine now. I just had to tinker the rest of the code a bit to make it work with a stepper motor. Thank you for this project, I learned a lot !
Hello, I have had several problems trying to control a BSC201 connected to a stepper motor DRV013 from a Raspberry Pi (the objective is to construct a web app), some of which I managed to solve.
First I have had to fix USB permission to access infos like Manufacturer and so. For that I followed this procedure : https://stackoverflow.com/questions/3738173/why-does-pyusb-libusb-require-root-sudo-permissions-on-linux
Then during the Port init, I noticed that the first message received after MGMSG_HW_REQ_INFO() is not of GMSG_HW_GET_INFO type, but this one :