When micro:bit is connected to USB, its LED display alerts user to an i2c error when PWR is switched from 1 to 0.
Set PWR to 1
Use parallax.py library from 0.3.4 branch's library folder if you are using a Rev A board or from the master branch's library folder if you are using the rev A4 board.
Run Test_Piezo_Beep_Then_Loop.py
Leave USB connected
Set PWR to 0
"OSError: I2C write error -1010" is scrolled in the micro:bit's LED display
Setting PWR back to 1 does not remedy. Only micro:bit reset after switching PWR from 0 to 1 clears and restarts the program.
# Test_Piezo_Beep_Then_Loop.py
from parallax import *
bot(22).frequency_out(300, 2000)
while True:
bot(21).digital_write(1)
bot(21).digital_write(0)
When micro:bit is connected to USB, its LED display alerts user to an i2c error when PWR is switched from 1 to 0.