<jupyter_start><jupyter_text>Source Meter Usage and Examples================This is an example script showcasing all the functionality of the source meter.The source meter provides a constant positive voltage.To use, connect the Stacks to the analog deck, then connect your device to the source meter pin(pin 1), and the ground pin next to it. Then, connect your computer to the Stacks via the Ethernet cable.Make sure your device can handle two volts before running this.[Source Meter Documentation](http://subinitial.com/misc/doc/subinitial.analog.htmlsource-meter)<jupyter_code>import subinitial.stacks as stacks

core = stacks.Core(host="192.168.1.49")  # Default host IP
analogdeck = stacks.AnalogDeck(core, bus_address=2)  # Default Analog Deck bus address

""" BASIC USAGE """

analogdeck.sourcemeter.set_sourcevoltage(2) # Set the sourcemeter output voltage

#Demo sourcemeter internal measurements
print("This should show 2V: {0}".format(analogdeck.sourcemeter.get_sourcevoltage()))
print("Show the measured telemetry:")
print("Voltage (V): {0}".format(analogdeck.sourcemeter.get_metervoltage()))
print("Current (A): {0}".format(analogdeck.sourcemeter.get_metercurrent()))

print("Show the measured power:")
print("Power(W): {0}".format(analogdeck.sourcemeter.get_meterpower()));<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11760242792109256, 'fraction_numerical': 0.012898330804248861, 'mean_word_length': 6.804733727810651, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '291333', 'license': 'MIT', 'n_tokens_mistral': 406, 'n_tokens_neox': 375, 'n_words': 121, 'path': 'Guides/stacksGuides/Source_Meter_example.ipynb', 'repo_name': 'rocketproplab/Guides', 'size': '1318'}