Your raw Raspberry Pi Pico will need to be loaded with:
- MicroPython Interpreter
- The selected file version (below), saved as
main.py
on the R-Pi Pico.
You can find various guides to using the Raspberry Pi Pico. The main steps you need to do are:
- Install Thonny
- Install MicroPython Firmware
- Open the selected file and save as
main.py
on the R-Pi Pico
Currently there are the following versions:
cspico_simple.py
: Most basic driver example
This version includes only the most basic required functionality. To use this version:
- Apply power (via MicroUSB or power input).
- Press 'Arm' switch.
- Wait for HV light to come on.
- Press 'pulse' switch.
The default file turns off the high voltage after some time to save battery power. You can comment out this section if you don't want that:
# Turn off HV if no activity after 60 seconds
if enabled:
if utime.ticks_diff(utime.ticks_ms(), timeout_start) > 60000:
enabled = False
pwm_off()
ledArm.off()
The default code keeps charging past the 'charged' pin going high. You can improve power consumption by toggling the charging on/off, but this hurts the already-slow recovery time from pulses being inserted.