cortictechnology / cep

CEP is a software platform designed for users that want to learn or rapidly prototype using standard A.I. components.
MIT License
166 stars 21 forks source link

Failed connecting to robot inventor #22

Closed kaalen closed 2 years ago

kaalen commented 2 years ago

I'm having issues running any logic that depends on LEGO Hub connection. I'm running this on Raspberry Pi 4B. I setup Bluetooth connection with the hub following another tutorial. I had issues initially but after I followed the tutorial it seems to connect now if I select the option to connect it to serial port. The blue light comes on and the hub is shown as connected in the Bluetooth status area on the Pi.

On the coding canvas I can see the MAC address of the Hub is picked up so there is some kind of connection. When I attempt to run a script I get the following error: "Initialization of control failed. Failed connecting to robot inventor, try restarting the robot inventor hub and run initialize again."

I tried rebooting both the Pi and the hub.

Any hints on how to troubleshoot this or how to establish a successful connection?

The tutorial I followed for setting up Bluetooth connection is here: https://medium.com/jj-innovative-results/how-to-set-up-bluetooth-on-the-raspberry-pi-for-a-lego-spike-61b137f98673

kaalen commented 2 years ago

OMG, I did not just spend a day trying to get this to work when it is in fact that SIMPLE. No need to manually connect Hub via bluetooth. I just started one of the example scripts, turned hub on and pressed bt button and the script does the bluetooth connection on initialization. Feeling a little silly now. This can be closed

michaelhwn commented 2 years ago

Hi @kaalen, sorry I missed your issue, I have been busy on another project lately. Good to know you have gotten it worked out.