Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphero turning off after executing code #19

Open
YuTaiLian opened this issue Jun 14, 2022 · 8 comments
Open

Sphero turning off after executing code #19

YuTaiLian opened this issue Jun 14, 2022 · 8 comments

Comments

@YuTaiLian
Copy link

Every time I execute my code my Sphero mini turns off directly and as such I have to restart it by connecting it to a charger, is there any way to avoid this behavior?

@superfashi
Copy link
Member

Turns off meaning that it cannot be wake up again by re-connecting to it?

@YuTaiLian
Copy link
Author

I meant that it turns off and then I must take it apart and insert the charger which is annoying but otherwise alright

@YuTaiLian
Copy link
Author

I had in mind a behavior of it reverting back to its pre-connected state so I could load a different script without having to connect it to the charger again

@superfashi
Copy link
Member

It is indeed very weird. Can you post your code here?

@YuTaiLian
Copy link
Author

Oh its actually any code, I tested it both with the Hello World program from the docs and it did the same after executing all described instructions

@superfashi
Copy link
Member

Hello World program? Can you post the code here? I’m assuming you are using the edu wrapper.

@YuTaiLian
Copy link
Author

YuTaiLian commented Jun 17, 2022

from spherov2 import scanner
from spherov2.sphero_edu import SpheroEduAPI
from spherov2.types import Color

toy = scanner.find_toy()
with SpheroEduAPI(toy) as droid:
    droid.set_main_led(Color(r=0, g=0, b=255))
    droid.set_speed(60)
    time.sleep(2)
    droid.set_speed(0)```
https://spherov2.readthedocs.io/en/latest/sphero_edu.html

@superfashi
Copy link
Member

can you try the same thing using the sphero edu app and see if your thing turns off?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants