This is an ongoing project. The very complicated process of setting up WeDo2 functionality with the raspberry pi is driving me nuts. I have finally found a git package that provides some insight. https://github.com/jannopet/LEGO-WeDo-2.0-Python-SDK/wiki
pip install wedo2
sudo -E pip install pexpect
To connect wedo2 hub
In seperate windows type: (from https://docs-emea.rs-online.com/webdocs/12eb/0900766b812eb651.pdf)
~$ sudo apt-get install python-serial
~$ wget https://raw.github.com/jrowberg/bglib/master/Python/Examples/bled1112_scanner.py
~$ chmod +x ./bled112_scanner.py
~$ ./bled112_scanner.py [STARTS SCANNER FOR BLED ACTIVITY]
THEN:
>> python
THEN: follow directions
>>from wedO2.smarthub import Smarthub
>>hub = Smarthub() [WHILE PRESSING WEDO2 CONNECT BUTTON]