<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Overview
TODO
[DONE] Implement host Python class API to wrap DMA ADC scanning
    mechanism described in this notebook.
Implement device C++ class API to wrap DMA ADC scanning mechanism
    described in this notebook.
Device
Connect to device
Step1:  Example
Step2:  Example
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pandas as pd
import arduino_helpers.hardware.teensy as teensy
from teensy_minimal_rpc.adc_sampler import AdcSampler, analog_reads
from teensy_minimal_rpc import SerialProxy
import teensy_minimal_rpc.ADC as ADC
# Disconnect from existing proxy (if available)
try:
    del proxy
except NameError:
    pass
proxy = SerialProxy()
proxy.pin_mode(teensy.LED_BUILTIN, 1)
proxy.digital_write(teensy.LED_BUILTIN, 1)
proxy.free_all()
Explanation: Overview
TODO
[DONE] Implement host Python class API to wrap DMA ADC scanning
    mechanism described in this notebook.
Implement device C++ class API to wrap DMA ADC scanning mechanism
    described in this notebook.
Device
Connect to device
End of explanation
(sampling_rate_hz, adc_settings,
 df_volts_i, df_adc_results) = analog_reads(proxy, 'A0', 20, resolution=12)
fig, axes = plt.subplots(1, 2, figsize=(10, 3))
df_volts_i.plot(ylim=0, ax=axes[0], style='x-')
axes[0].set_ylabel('volts')
df_adc_results.plot(style='x-', ax=axes[1],
                    ylim=(-5, 1.1 * (1 << adc_settings['Bit-width'])))
axes[1].set_ylabel('raw_adc')
for ax in axes:
    ax.set_xlabel('sample_i')
Explanation: Example: Measure 'A0' when connected to 3.3V
End of explanation
(sampling_rate_hz, adc_settings,
 df_volts_i, df_adc_results) = analog_reads(proxy, 'A0', 20, resolution=12)
fig, axes = plt.subplots(1, 2, figsize=(10, 3))
df_volts_i.plot(ylim=0, ax=axes[0], style='x-')
axes[0].set_ylabel('volts')
df_adc_results.plot(style='x-', ax=axes[1],
                    ylim=(-5, 1.1 * (1 << adc_settings['Bit-width'])))
axes[1].set_ylabel('raw_adc')
for ax in axes:
    ax.set_xlabel('sample_i')
Explanation: Example: Measure 'A0' when connected to GND
End of explanation
<END_TASK>