pyboard issue from jetson nano to LEGO 51515

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
hmikelee
Posts: 4
Joined: Tue Apr 06, 2021 5:19 am

pyboard issue from jetson nano to LEGO 51515

Post by hmikelee » Fri Apr 09, 2021 5:34 am

Dear all,

Seeking help on using pyboard class from jetson nano to LEGO 51515 through Bluetooth

I can use terminal emulator picocom to connect to LEGO 51515 from jetson nano through bluetooth, enter raw REPL mode and execute a simple test python script without problem.

When I use pyboard class in pyboard.py to execute the same script in a jupyter notebook environment, not every command in the script can be executed properly. I noticed that only the beeps works properly, all the motor related command were executed and reported OK, but the motor did not move. For color sensor, I always got back the error message 'No Color sensor on port C'

Any direction on debugging this issue will be highly appreciated.

hmikelee

User avatar
aivarannamaa
Posts: 171
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

Re: pyboard issue from jetson nano to LEGO 51515

Post by aivarannamaa » Fri Apr 09, 2021 11:54 am

I don't have this device myself, but a Thonny user also reported problems with it and the error message was somewhat similar (https://github.com/thonny/thonny/issues/1702). Perhaps LEGO's MicroPython has some quirks.

I'd be happy if you tried connecting to your hub via Thonny (https://thonny.org):

* Run => Select interpreter => MicroPython (generic)
* Select your port => OK
* Try entering commands into shell, showing variables (View => Variables) and files (View => Files) and editing a file (double click on a file in the lower part of the file browser).
Aivar Annamaa
https://thonny.org

jackyjoy123
Posts: 2
Joined: Fri Apr 09, 2021 2:52 pm

Re: pyboard issue from jetson nano to LEGO 51515

Post by jackyjoy123 » Fri Apr 09, 2021 2:54 pm

thanks my issue has been fixed.

hmikelee
Posts: 4
Joined: Tue Apr 06, 2021 5:19 am

Re: pyboard issue from jetson nano to LEGO 51515

Post by hmikelee » Sat Apr 10, 2021 6:31 am

Dear Jackyjoy123,

Will you be kind to share the solution for your issue.

Thank you

hmikelee
Posts: 4
Joined: Tue Apr 06, 2021 5:19 am

Re: pyboard issue from jetson nano to LEGO 51515

Post by hmikelee » Sun Apr 11, 2021 8:45 am

Dear all,

I think I solved this problem :) :) :)

2 code modifications for the standard pyboard class
(1). use 1 ctrl-C instead of 2 to interrupt the default running program
(2). soft reset ctrl-D in enter_raw_repl() causes some problems. I change it to ctrl-B and then ctrl-A again to go into raw REPL mode

Recent tests look ok

Will post the modified pyboard class in github later

Thank you all for your responses. Highly appreciate you take the time to look at this problem

hmikelee

Post Reply