Skip to content
/ SoloPy Public

Controlling Motors using SOLO Motor Controllers with PYTHON on RASPBERRY PI, Linux, windows, and more!

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE.txt
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

Solo-FL/SoloPy

Repository files navigation

Repository License

SoloPy

SoloPy is a Python library published by SOLO Motor Controllers to control, command or read all the parameters that are stored or existing in the command set of SOLO devices. More information about SoloPy on the SOLO website. For List of All the Available Methods Read the DataSheet

SoloPy allows SOLO devices to be used in this conditions:

  • USB Communication with Windows OS or Linux
  • UART protocol with RASPBERRY PI or any similar controller
  • CanOpen protocol with RASPBERRY PI or any similar controller

Installation

Please make sure you have installed Python 3 and pip

Install Solopy From Pip

$ pip install solopy

Update

If you have installed the library and you want to update it on Linux, RASPBERRY PI or Windows

$ pip install --upgrade SoloPy

USB Communication with Windows OS or Linux Note

  1. Connect Solo to Raspberry Pi or Pc
  2. Open terminal in linux(cmd in windows) and enter the following command
$ python -m serial.tools.list_ports -v
  1. this will show you the port name that SOLO is connected to (in linux it's sth like '/dev/ttyAMC0' and in windows it's sth like 'COM8'

UART protocol with RASPBERRY PI Note

In order to enable UART Protocol on Raspberry Pi you need to follow this one time process.

  1. In Raspberry Pi, enter following command in Terminal to enable UART
$ sudo raspi-config
  1. Select -> Interfacing Options
  2. After selecting Interfacing option, select Serial option to enable UART
  3. Then it will ask for the login shell to be accessible over Serial, select No shown as follows.
  4. At the end, it will ask for enabling Hardware Serial port, select Yes,
  5. Finally, our UART is enabled for Serial Communication on RX and TX pins of Raspberry Pi 3.
  6. Then, reboot the Raspberry Pi.

CanOpen protocol with RASPBERRY PI Note

In order to enable CanOpen Protocol on Raspberry Pi you need to follow this process one time

  1. turn SPI on in raspberry pi:
$ sudo raspi-config

then go to interfaces

then go to SPI and turn on

then go to reboot

  1. type in terminal
$ sudo apt-get update
  1. then type this command:
$ sudo nano /boot/config.txt

4- scroll down and add these lines:

dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25

5- then reboot RASPBERRY PI

Every time you reboot RASPBERRY PI you need to follow this process

1- type this command

$ sudo ip link set can0 up type can bitrate 1000000

Notes

  • The bit-rate has to be the same as the one used in the code
  • The following CAN transceiver module "PiCAN2" has been used to test the library

Dependencies

Python 3

python-interface

for UART pyserial

for CanOpen Python-Can

Authors

SoloPy is created by SOLO Motor Controllers team

License

GNU General Public License v3.0 or later

See COPYING to see the full text.