Solenoid Engine – Microbit – Micro Python – Simple

</p>
<p># Solenoid Engine Simple Script - Flat out Speed<br />
from microbit import *</p>
<p>while True:<br />
    # if pin2.read_analog()&lt;400: for V1 engines<br />
    if pin2.read_analog()&gt;600:<br />
        pin1.write_digital(1)<br />
        display.show(Image.HAPPY)<br />
    else:<br />
        display.show(Image.SAD)<br />
        pin1.write_digital(0)</p>
<p>