Prototype-04

09/03/2023

Starting Point

Powershell sends $ sign via serial to microbit when it is ready to recieve. Microbit returns comma separated string with button, pitch and roll values.

Starting point

Goal

  • Replace Powershell with Python
  • Replace USB serial with Bluetooth
  • Improve flying experience

PLAN

  1. Write Python to run in VSCode
  2. Work out how to use Bluetooth LE on microbit
  3. Address issues from Prototype-01, see OneNote Sep-11

DO

  • Update code and test
    • Sep 11
    • Sep 16
    • Sep 22
  • Test and Commit in FlyEarth04
    • Oct 13
    • Oct 15
    • Nov 12

CHECK

See results at:

ACT

  • ///TODO Sep-21-2 how to repeat sh L/R, no shift up until next loop
    • while wait for next loop, $i value changes
    • kd $sh
    • kd $ar/$al
    • ku $sh
    • kd $au
  • this might require multiple threads
    • alternative repeat a fixed number of times, to fill 500ms
    1. Try that
    2. No good, looks like the repeated perform takes 500 ms each, which accumulates the bufferr and delays
    3. making multiple calls to serial.Readline waits for next data, so does not help
    4. It may be time to investigate events! Stackoverclow
  • ///TODO Sep-21-1 this is a bit too fast]
    • Documentation says Alt key slows things down but in practice it works like shift, no good
  • // TODO Sep-21-3 how to find camera-altitude element?