Objective 2: The Gyroscope Discovery not complete (Codeair)

Quick question. We did everything in this objective but it won’t click that it was completed. Any suggestions? Thanks

Hey @shu — happy to help! That objective has three goals that all need to pass, and it’s usually goal 2 or 3 that trips folks up. A quick checklist:

  1. Use the Console (REPL), not the code editor. The commands for this objective need to be typed directly into the Console panel at the bottom — running them from the editor won’t satisfy the validators.
  2. Import the flight module first — in the REPL, type:
    from flight import *
    
  3. Baseline reading (drone flat and still): Place the drone on a flat surface, don’t touch it, then run:
    get_data(GYRO)
    
    All three values in the tuple need to be between roughly -300 and 300. If it’s drifting higher than that even when still, try running it once or twice more after letting it settle.
  4. Moving reading: While actively rotating or shaking the drone, run get_data(GYRO) again. At least one of the three values needs to go above 300 or below -300 — so a decent wiggle, not just a nudge.

If all three of those have been done in the Console and it’s still not clicking green, it might be worth a screenshot of the Console showing the two get_data(GYRO) outputs so we can see what values are coming back.

cc @Kathy @dewing for visibility

That’s what we had tried without avail. Here’s a screenshot of what we did.

Thanks for the screenshot — that’s super helpful! Your values actually look right to me:

  • Baseline reading had all three numbers well within ±300 :white_check_mark:
  • Moving reading had values way past ±300 :white_check_mark:

So the goals should be clicking green. A couple of things that sometimes cause the objective to not register even when the commands are correct:

  1. Re-run the baseline, then immediately re-run the moving one. The validator looks at the most recent matching tuple in the console, so if anything else got printed between the two, that can throw it off. Place the drone flat, run get_data(GYRO), then (without clearing or typing anything else) pick it up and wiggle it while running get_data(GYRO) again.

  2. Make sure the drone is actually connected via USB and the REPL shows it’s live — if the REPL isn’t talking to the drone, get_data can sometimes return stale values from a prior session that the validator won’t accept as a fresh reading.

  3. Try reloading the CodeSpace page (or clicking out of the objective and back in). Occasionally the goal tracker gets a little stuck and a refresh resets it.

  4. If none of that does it, could you share one more screenshot showing the Goals panel on the right side alongside the Console? That’ll let us see which specific goal checkmark is still missing.

cc @Kathy @dewing — you two may have seen this one before, happy to defer if there’s a known gotcha I’m missing.

Still nothing. The USB was connected to the drone.

Ah, looking at your screenshot again — I notice the very first goal (“Open the Console… and import the flight module”) is the one that has to click green first, and it only fires when the Console panel is opened during the objective. If your Console was already open from a previous objective when you started this one, that event may not have registered.

Quick thing to try:

  1. Close the Console panel (click the Console tab/X to collapse it).
  2. Re-open it from within this objective.
  3. Then re-run:
    from flight import *
    get_data(GYRO)        # drone flat on desk
    get_data(GYRO)        # while actively rotating it
    

Also worth checking: make sure the drone in the CodeSpace toolbar shows as Connected (not a red disconnected icon) when you run the commands — the validator only counts output from a live REPL session.

If that still doesn’t turn them green, I’d defer to @Kathy @dewing on this one — they’ll be able to tell from your account whether the objective is seeing the goal events at all, which I can’t check from here.

Just saw there was a new version of Codespace. Once I updated it, it worked out fine.

Thanks much

Awesome, glad that did the trick! Thanks for circling back to let us know — good to have the resolution on the record in case anyone else hits the same thing.

cc @Kathy @dewing — sounds like a CodeSpace update resolved it.

Thanks @Sam - and thanks to @jlloyd for the quick fix!!

@shu - the error was with the type of validator used for that particular goal. Totally on our end - sorry for the inconvenience and thanks for your patience working through it. Good to have that fixed!

Thank you all for your help and patience. Much appreciated.