{"id":6679,"date":"2021-08-25T23:44:26","date_gmt":"2021-08-25T16:44:26","guid":{"rendered":"https:\/\/www.phidgets.com\/education\/?page_id=6679"},"modified":"2023-03-14T03:09:09","modified_gmt":"2023-03-13T20:09:09","slug":"accuracy","status":"publish","type":"page","link":"https:\/\/www.phidgets.com\/education\/learn\/projects\/scale-kit\/accuracy\/","title":{"rendered":"Increasing Accuracy"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; specialty=&#8221;on&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;1_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;ph-vertical-menu&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item\" href=\"\/education\/learn\/projects\/scale-kit\/introduction\"><!-- [et_pb_line_break_holder] -->    Introduction<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item\" href=\"\/education\/learn\/projects\/scale-kit\/parts\"><!-- [et_pb_line_break_holder] -->    Parts<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item\" href=\"\/education\/learn\/projects\/scale-kit\/assemble\"><!-- [et_pb_line_break_holder] -->    Assemble<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item\" href=\"\/education\/learn\/projects\/scale-kit\/scale-offset\/\"><!-- [et_pb_line_break_holder] -->    Get the Scale Offset<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item\" href=\"\/education\/learn\/projects\/scale-kit\/calculate-weight\/\"><!-- [et_pb_line_break_holder] -->    Calculate Weight<!-- [et_pb_line_break_holder] -->  <\/a> <!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active blue\" href=\"\/education\/learn\/projects\/scale-kit\/accuracy\/\"><!-- [et_pb_line_break_holder] -->    Increasing Accuracy<!-- [et_pb_line_break_holder] -->  <\/a>  <!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-subitem\" href=\"#overview\"><!-- [et_pb_line_break_holder] -->    Overview<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-subitem\" href=\"#calibrate-scale\"><!-- [et_pb_line_break_holder] -->    Calibrating Your Scale<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-subitem\" href=\"#calibrate-formula\"><!-- [et_pb_line_break_holder] -->    Calibration Formula<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --> <a class=\"ph-vertical-menu-subitem\" href=\"#write-code\"><!-- [et_pb_line_break_holder] -->    Write Code<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-subitem\" href=\"#run-program\"><!-- [et_pb_line_break_holder] -->    Run Your Program<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-subitem\" href=\"#troubleshoot\"><!-- [et_pb_line_break_holder] -->    Troubleshoot<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item\" href=\"\/education\/learn\/projects\/scale-kit\/capacity\/\"><!-- [et_pb_line_break_holder] -->    Change Capacity<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][\/et_pb_column][et_pb_column type=&#8221;2_3&#8243; specialty_columns=&#8221;4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_row_inner module_id=&#8221;overview&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Scale Kit: Increasing Accuracy&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<div class=\"ph-overline-text\"><!-- [et_pb_line_break_holder] --><a href=\"\/education\/learn\/projects\">Projects<\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p><!-- [et_pb_line_break_holder] --><\/p>\n<div class=\"ph-pre-h1 ph-color-grey-200\">Phidget Scale Kit<\/div>\n<p><!-- [et_pb_line_break_holder] --><\/p>\n<h1>Increase Accuracy<\/h1>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;Instructions&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee>In this section, you will learn how to calibrate your scale to increase it&#8217;s accuracy!<\/pee>[\/et_pb_code][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2021\/08\/scale_target.jpg&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; max_width=&#8221;75%&#8221; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][et_pb_code admin_label=&#8221;Instructions&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee><\/pee><!-- [et_pb_line_break_holder] --><pee>You will need to create a new project called <em>ScaleCalibration<\/em> and import the Phidgets Library. If you\u2019ve forgotten how to do this, revisit the <a href=\"\/education\/learn\/getting-started-kit-tutorial\/configure-ide\/\">Configure section<\/a> from the Getting Started Kit.<\/pee>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;off|off|off&#8221; admin_label=&#8221;Row&#8221; module_id=&#8221;calibrate-scale&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Calibrating Your Scale&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Calibrating Your Scale<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>When calculating weight in your previous program, you used the code below.<\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;off|off|off&#8221; admin_label=&#8221;Row&#8221; module_class=&#8221;ph-user-java&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Change programming language&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee>Not your programming language? <a class=\"ph-toggle-settings\">Set your preferences<\/a> so we can display relevant code examples.<\/pee>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample &#8211; Netbeans&#8221; module_class=&#8221;ph-user-netbeans&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-java\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->\/\/Calculate Weight (kg)<!-- [et_pb_line_break_holder] -->double weight = 4700 * (scale.getVoltageRatio() - offsetValue);<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample &#8211; Eclipse&#8221; module_class=&#8221;ph-user-eclipse&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-java\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->\/\/Calculate Weight (kg)<!-- [et_pb_line_break_holder] -->double weight = 4700 * (scale.getVoltageRatio() - offsetValue);<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample &#8211; Processing&#8221; module_class=&#8221;ph-user-processing&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-java\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->\/\/Calculate Weight (kg)<!-- [et_pb_line_break_holder] -->double weight = 4700 * (scale.getVoltageRatio() - offsetValue);<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;off|off|off&#8221; admin_label=&#8221;Row&#8221; module_class=&#8221;ph-user-python&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Change programming language&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee>Not your programming language? <a class=\"ph-toggle-settings\">Set your preferences<\/a> so we can display relevant code examples.<\/pee>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample Python&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-python\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->#Calculate Weight (kg)<!-- [et_pb_line_break_holder] -->weight = 4700 * (scale.getVoltageRatio() - offsetValue)<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;off|off|off&#8221; admin_label=&#8221;Row&#8221; module_class=&#8221;ph-user-csharp&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Change programming language&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee>Not your programming language? <a class=\"ph-toggle-settings\">Set your preferences<\/a> so we can display relevant code examples.<\/pee>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample &#8211; C#&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-csharp\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->\/\/Calculate Weight (kg)<!-- [et_pb_line_break_holder] -->double weight = 4700 * (scale.VoltageRatio - offsetValue);<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;off|off|off&#8221; admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Calibrating Your Scale cont.&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee>The value 4700 is an estimate of the slope of your scale. In order to calculate the real value for your specific scale, you will need to use a <strong>known weight<\/strong>.<!-- [et_pb_line_break_holder] --><pee> If you have access to an accurate scale, you can simply measure an everyday object and record its weight. For example, a water bottle works great:<\/pee> <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->[\/et_pb_code][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2021\/08\/scale_waterbottle.jpg&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][et_pb_code admin_label=&#8221;Calibrating Your Scale cont.&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee>Reference the table below when selecting a weight for calibration.<\/pee> <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->[\/et_pb_code][et_pb_text admin_label=&#8221;Table&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; text_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; text_text_shadow_vertical_length_tablet=&#8221;0px&#8221; text_text_shadow_blur_strength_tablet=&#8221;1px&#8221; link_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; link_text_shadow_vertical_length_tablet=&#8221;0px&#8221; link_text_shadow_blur_strength_tablet=&#8221;1px&#8221; ul_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; ul_text_shadow_vertical_length_tablet=&#8221;0px&#8221; ul_text_shadow_blur_strength_tablet=&#8221;1px&#8221; ol_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; ol_text_shadow_vertical_length_tablet=&#8221;0px&#8221; ol_text_shadow_blur_strength_tablet=&#8221;1px&#8221; quote_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; quote_text_shadow_vertical_length_tablet=&#8221;0px&#8221; quote_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_2_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_2_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_2_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_3_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_3_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_3_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_4_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_4_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_4_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_5_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_5_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_5_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_6_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_6_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_6_text_shadow_blur_strength_tablet=&#8221;1px&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<table>\n<thead>\n<tr>\n<th>Load Cell<\/th>\n<th>Recommended Weight<\/th>\n<\/tr>\n<tr>\n<th>780g<\/th>\n<th>~400g<\/th>\n<\/tr>\n<tr>\n<th>5kg<\/th>\n<th>~2.5kg<\/th>\n<\/tr>\n<tr>\n<th>25kg<\/th>\n<th>~2.5kg<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<\/tbody>\n<\/table>\n<p>[\/et_pb_text][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;off|off|off&#8221; admin_label=&#8221;Row&#8221; module_id=&#8221;calibrate-formula&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Calibration Formula&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Calibration Formula<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>The formula below can be used to find a new, more precise slope value for your scale.<\/pee><!-- [et_pb_line_break_holder] --><pee><strong>Slope = Known Weight (kg) \/ (Measured Weight &#8211; Offset)<\/strong><\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->[\/et_pb_code][et_pb_code admin_label=&#8221;Calibration Formula&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee>Where:<\/pee><!-- [et_pb_line_break_holder] --><pee><strong>Known Weight (kg)<\/strong> is your known weight in kg.<!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] --><strong>Measurement<\/strong> is the voltage ratio of your known weight.<!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] --><strong>Offset<\/strong> is the offset value of your scale.<!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] --><\/pee><!-- [et_pb_line_break_holder] --><pee>You can determine the slope of your scale yourself using the formula above, or you can run the program below to calculate it programmatically.<\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner module_id=&#8221;write-code&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_text disabled_on=&#8221;on|on|on&#8221; admin_label=&#8221;invisible anchor&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; text_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; text_text_shadow_vertical_length_tablet=&#8221;0px&#8221; text_text_shadow_blur_strength_tablet=&#8221;1px&#8221; link_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; link_text_shadow_vertical_length_tablet=&#8221;0px&#8221; link_text_shadow_blur_strength_tablet=&#8221;1px&#8221; ul_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; ul_text_shadow_vertical_length_tablet=&#8221;0px&#8221; ul_text_shadow_blur_strength_tablet=&#8221;1px&#8221; ol_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; ol_text_shadow_vertical_length_tablet=&#8221;0px&#8221; ol_text_shadow_blur_strength_tablet=&#8221;1px&#8221; quote_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; quote_text_shadow_vertical_length_tablet=&#8221;0px&#8221; quote_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_2_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_2_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_2_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_3_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_3_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_3_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_4_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_4_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_4_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_5_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_5_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_5_text_shadow_blur_strength_tablet=&#8221;1px&#8221; header_6_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; header_6_text_shadow_vertical_length_tablet=&#8221;0px&#8221; header_6_text_shadow_blur_strength_tablet=&#8221;1px&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; disabled=&#8221;on&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_text][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner module_class=&#8221;ph-user-java&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Write code Java&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Write Code (Java)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Not your programming language? <a class=\"ph-toggle-settings\">Set your preferences<\/a> so we can display relevant code examples.<\/pee><!-- [et_pb_line_break_holder] -->[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample &#8211; Netbeans&#8221; module_class=&#8221;ph-user-netbeans&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-java\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->package scalecalibration;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->\/\/Add Phidgets Library<!-- [et_pb_line_break_holder] -->import com.phidget22.*;<!-- [et_pb_line_break_holder] -->import java.util.Scanner;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->public class ScaleCalibration {<!-- [et_pb_line_break_holder] -->    \/\/Define<!-- [et_pb_line_break_holder] -->    static VoltageRatioInput scale;<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    public static double getAverage()throws Exception{<!-- [et_pb_line_break_holder] -->        double average = 0;<!-- [et_pb_line_break_holder] -->        int count = 0;<!-- [et_pb_line_break_holder] -->        System.out.println(\"Averaging Value...\");<!-- [et_pb_line_break_holder] -->        while(count < 64){<!-- [et_pb_line_break_holder] -->            average += scale.getVoltageRatio();<!-- [et_pb_line_break_holder] -->            count += 1;<!-- [et_pb_line_break_holder] -->            Thread.sleep(20);<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->        return average\/count;<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    public static void main(String[] args) throws Exception{<!-- [et_pb_line_break_holder] -->        Scanner scan = new Scanner(System.in);<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Create<!-- [et_pb_line_break_holder] -->        scale = new VoltageRatioInput();<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Open<!-- [et_pb_line_break_holder] -->        scale.open(1000);<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Set data interval to minimum<!-- [et_pb_line_break_holder] -->        scale.setDataInterval(scale.getMinDataInterval());<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        System.out.println(\"Make sure nothing is on your scale and press Enter\");<!-- [et_pb_line_break_holder] -->        scan.nextLine();<!-- [et_pb_line_break_holder] -->        double offset = getAverage();<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        System.out.println(\"Place a known weight on the scale, type the weight in kilograms and press Enter\");<!-- [et_pb_line_break_holder] -->        double knownWeight = Double.parseDouble(scan.nextLine());<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        double measuredWeight = getAverage();<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        double slope = knownWeight \/ (measuredWeight - offset);<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        System.out.println(\"Your new slope value is: \" + Math.round(slope));<!-- [et_pb_line_break_holder] -->    }    <!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample &#8211; Eclipse&#8221; module_class=&#8221;ph-user-eclipse&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-java\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->\/\/Add Phidgets Library<!-- [et_pb_line_break_holder] -->import com.phidget22.*;<!-- [et_pb_line_break_holder] -->import java.util.Scanner;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->public class ScaleCalibration {<!-- [et_pb_line_break_holder] -->    \/\/Define<!-- [et_pb_line_break_holder] -->    static VoltageRatioInput scale;<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    public static double getAverage()throws Exception{<!-- [et_pb_line_break_holder] -->        double average = 0;<!-- [et_pb_line_break_holder] -->        int count = 0;<!-- [et_pb_line_break_holder] -->        System.out.println(\"Averaging Value...\");<!-- [et_pb_line_break_holder] -->        while(count < 64){<!-- [et_pb_line_break_holder] -->            average += scale.getVoltageRatio();<!-- [et_pb_line_break_holder] -->            count += 1;<!-- [et_pb_line_break_holder] -->            Thread.sleep(20);<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->        return average\/count;<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    public static void main(String[] args) throws Exception{<!-- [et_pb_line_break_holder] -->        Scanner scan = new Scanner(System.in);<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Create<!-- [et_pb_line_break_holder] -->        scale = new VoltageRatioInput();<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Open<!-- [et_pb_line_break_holder] -->        scale.open(1000);<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Set data interval to minimum<!-- [et_pb_line_break_holder] -->        scale.setDataInterval(scale.getMinDataInterval());<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        System.out.println(\"Make sure nothing is on your scale and press Enter\");<!-- [et_pb_line_break_holder] -->        scan.nextLine();<!-- [et_pb_line_break_holder] -->        double offset = getAverage();<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        System.out.println(\"Place a known weight on the scale, type the weight in kilograms and press Enter\");<!-- [et_pb_line_break_holder] -->        double knownWeight = Double.parseDouble(scan.nextLine());<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        double measuredWeight = getAverage();<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        double slope = knownWeight \/ (measuredWeight - offset);<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        System.out.println(\"Your new slope value is: \" + Math.round(slope));<!-- [et_pb_line_break_holder] -->    }    <!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample &#8211; Processing&#8221; module_class=&#8221;ph-user-processing&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-java\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->Code is not available for Processing. Please select another Java-based IDE.<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner module_class=&#8221;ph-user-python&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Write code Python&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Write Code (Python)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Not your programming language? <a class=\"ph-toggle-settings\">Set your preferences<\/a> so we can display relevant code examples.<\/pee>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-python\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->#Add Phidgets Library<!-- [et_pb_line_break_holder] -->from Phidget22.Phidget import *<!-- [et_pb_line_break_holder] -->from Phidget22.Devices.VoltageRatioInput import *<!-- [et_pb_line_break_holder] -->#Required for sleep statement<!-- [et_pb_line_break_holder] -->import time<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->def get_average():    <!-- [et_pb_line_break_holder] -->    average = 0<!-- [et_pb_line_break_holder] -->    count = 0<!-- [et_pb_line_break_holder] -->    print(\"Averaging Value...\\n\")<!-- [et_pb_line_break_holder] -->    while(count < 64):<!-- [et_pb_line_break_holder] -->        average += scale.getVoltageRatio()<!-- [et_pb_line_break_holder] -->        count += 1<!-- [et_pb_line_break_holder] -->        time.sleep(0.02)<!-- [et_pb_line_break_holder] -->    return average\/count<!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Create<!-- [et_pb_line_break_holder] -->scale = VoltageRatioInput()<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Open<!-- [et_pb_line_break_holder] -->scale.openWaitForAttachment(1000)<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Set data interval to minimum<!-- [et_pb_line_break_holder] -->scale.setDataInterval(scale.getMinDataInterval())<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->input(\"Make sure nothing is on your scale and press Enter\\n\")<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->offset = get_average()<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->known_weight = input(\"Place a known weight on the scale, type the weight in kilograms and press Enter\\n\")<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->measured_weight = get_average()<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->slope = float(known_weight) \/ (measured_weight - offset)<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->print(\"Your new slope value is: \" + str(round(slope,0)))<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner module_class=&#8221;ph-user-csharp&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Write code C#&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Write Code (C#)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Not your programming language? <a class=\"ph-toggle-settings\">Set your preferences<\/a> so we can display relevant code examples.<\/pee>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-csharp\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->\/\/Add Phidgets Library<!-- [et_pb_line_break_holder] -->using Phidget22;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->namespace ScaleCalibration<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->    class Program<!-- [et_pb_line_break_holder] -->    {<!-- [et_pb_line_break_holder] -->        static VoltageRatioInput scale;<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        static double getAverage()<!-- [et_pb_line_break_holder] -->        {<!-- [et_pb_line_break_holder] -->            double average = 0;<!-- [et_pb_line_break_holder] -->            int count = 0;<!-- [et_pb_line_break_holder] -->            System.Console.WriteLine(\"Averaging Value ...\");<!-- [et_pb_line_break_holder] -->            while(count < 64)<!-- [et_pb_line_break_holder] -->            {<!-- [et_pb_line_break_holder] -->                average += scale.VoltageRatio;<!-- [et_pb_line_break_holder] -->                count += 1;<!-- [et_pb_line_break_holder] -->                System.Threading.Thread.Sleep(20);<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->            return average \/ count;<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        static void Main(string[] args)<!-- [et_pb_line_break_holder] -->        {<!-- [et_pb_line_break_holder] -->            \/\/Create<!-- [et_pb_line_break_holder] -->            scale = new VoltageRatioInput();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Open<!-- [et_pb_line_break_holder] -->            scale.Open(1000);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Set data interval to minimum<!-- [et_pb_line_break_holder] -->            scale.DataInterval = scale.MinDataInterval;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            System.Console.WriteLine(\"Make sure nothing is on your scale and press Enter\");<!-- [et_pb_line_break_holder] -->            System.Console.ReadLine();<!-- [et_pb_line_break_holder] -->            double offset = getAverage();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            System.Console.WriteLine(\"Place a known weight on the scale, type the weight in kilograms and press Enter\");<!-- [et_pb_line_break_holder] -->            double knownWeight = System.Convert.ToDouble(System.Console.ReadLine());<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            double measuredWeight = getAverage();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            double slope = knownWeight \/ (measuredWeight - offset);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            System.Console.WriteLine(\"Your new slope value is: \" + slope.ToString(\"F0\"));<!-- [et_pb_line_break_holder] -->            System.Console.ReadLine();<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner module_class=&#8221;ph-user-swift&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Write code Swift&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Write Code (Swift)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Not your programming language? <a class=\"ph-toggle-settings\">Set your preferences<\/a> so we can display relevant code examples.<\/pee>[\/et_pb_code][et_pb_code admin_label=&#8221;Instructions&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<pee>The code below assumes you&#8217;ve created a label and linked it to an IBOutlet named mainLabel, a button and linked it to an IBOutlet named calibrationButton, and a text input and linked it to an IBOutlet named knownWeight.<\/pee>[\/et_pb_code][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2021\/09\/scale_swift_calibrate.png&#8221; show_in_lightbox=&#8221;on&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; width=&#8221;50%&#8221; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][et_pb_code admin_label=&#8221;Code Sample&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<pre class=\"language-swift\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->import Cocoa<!-- [et_pb_line_break_holder] -->\/\/Add Phidgets Library<!-- [et_pb_line_break_holder] -->import Phidget22Swift<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->class ViewController: NSViewController {<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->    \/\/Create<!-- [et_pb_line_break_holder] -->    let scale = VoltageRatioInput()<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    @IBOutlet weak var mainLabel: NSTextField!<!-- [et_pb_line_break_holder] -->    @IBOutlet weak var knownWeight: NSTextField!<!-- [et_pb_line_break_holder] -->    @IBOutlet weak var calibrationButton: NSButton!<!-- [et_pb_line_break_holder] -->    var offset = 0.0<!-- [et_pb_line_break_holder] -->    var slope = 0.0<!-- [et_pb_line_break_holder] -->    var average = 0.0<!-- [et_pb_line_break_holder] -->    var count = 0<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    override func viewDidLoad() {<!-- [et_pb_line_break_holder] -->        super.viewDidLoad()<!-- [et_pb_line_break_holder] -->        do{<!-- [et_pb_line_break_holder] -->            \/\/Subscribe to event<!-- [et_pb_line_break_holder] -->            let _ = scale.voltageRatioChange.addHandler(scale_change)<!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] -->            \/\/Open<!-- [et_pb_line_break_holder] -->            try scale.open()<!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] -->            \/\/Set data interval to minimum<!-- [et_pb_line_break_holder] -->            try scale.setDataInterval(scale.getMinDataInterval())<!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] -->        }catch{<!-- [et_pb_line_break_holder] -->            print(error)<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    func scale_change(sender:VoltageRatioInput, voltageRatio: Double){<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->    @IBAction func calibrationButton(_ sender: Any) {<!-- [et_pb_line_break_holder] -->        do{<!-- [et_pb_line_break_holder] -->            average = 0<!-- [et_pb_line_break_holder] -->            count = 0<!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] -->            if(calibrationButton.title == \"Begin Calibration\"){<!-- [et_pb_line_break_holder] -->                while(count < 64){<!-- [et_pb_line_break_holder] -->                    try average += scale.getVoltageRatio()<!-- [et_pb_line_break_holder] -->                    count += 1<!-- [et_pb_line_break_holder] -->                    usleep(20000)<!-- [et_pb_line_break_holder] -->                }<!-- [et_pb_line_break_holder] -->                offset = average \/ Double(count)<!-- [et_pb_line_break_holder] -->                <!-- [et_pb_line_break_holder] -->                calibrationButton.title = \"Continue Calibration\"<!-- [et_pb_line_break_holder] -->                mainLabel.stringValue = \"Place known weight on scale and press Continue Calibration.\"<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->            else{<!-- [et_pb_line_break_holder] -->                if let knownWeightVal = Double(knownWeight.stringValue){<!-- [et_pb_line_break_holder] -->                    while(count < 64){<!-- [et_pb_line_break_holder] -->                        try average += scale.getVoltageRatio()<!-- [et_pb_line_break_holder] -->                        count += 1<!-- [et_pb_line_break_holder] -->                        usleep(20000)<!-- [et_pb_line_break_holder] -->                    }<!-- [et_pb_line_break_holder] -->                    let measuredWeight = average \/ Double(count)<!-- [et_pb_line_break_holder] -->                    let slope = knownWeightVal \/ (measuredWeight - offset)<!-- [et_pb_line_break_holder] -->                    mainLabel.stringValue = \"Your new slope value is: \" + String(format: \"%.0f\",slope)<!-- [et_pb_line_break_holder] -->                }<!-- [et_pb_line_break_holder] -->                else{<!-- [et_pb_line_break_holder] -->                    mainLabel.stringValue = \"ERROR. Please enter a correct weight in kg above. Then place known weight on scale and press Continue Calibration.\"<!-- [et_pb_line_break_holder] -->                }<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->        }catch{<!-- [et_pb_line_break_holder] -->            print(error)<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;off|off|off&#8221; admin_label=&#8221;Row&#8221; module_id=&#8221;run-program&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Run Your Program&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Run Your Program<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>After running the program above, you will have a new slope value that should be close to 4700. Replace the old value in your previous programs with the new value.<\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;on|on|on&#8221; admin_label=&#8221;Row&#8221; module_id=&#8221;troubleshoot&#8221; _builder_version=&#8221;4.19.5&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; hover_enabled=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221; disabled=&#8221;on&#8221; sticky_enabled=&#8221;0&#8243;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_toggle title=&#8221;Troubleshoot&#8221; admin_label=&#8221;Troubleshoot&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; title_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; title_text_shadow_vertical_length_tablet=&#8221;0px&#8221; title_text_shadow_blur_strength_tablet=&#8221;1px&#8221; closed_title_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; closed_title_text_shadow_vertical_length_tablet=&#8221;0px&#8221; closed_title_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_link_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_link_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_link_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_ul_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_ul_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_ul_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_ol_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_ol_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_ol_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_quote_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_quote_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_quote_text_shadow_blur_strength_tablet=&#8221;1px&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; text_shadow_horizontal_length_tablet=&#8221;0px&#8221; text_shadow_vertical_length_tablet=&#8221;0px&#8221; text_shadow_blur_strength_tablet=&#8221;1px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<ol>\n<li>Make sure everything is plugged in properly and your VINT Hub is connected to your computer.<\/li>\n<li>Stop running other programs that are using your Phidgets before running a program.<\/li>\n<\/ol>\n<p>If you are still having issues visit <a href=\"\/education\/learn\/advanced-troubleshooting\/\" target=\"_blank\" rel=\"noopener noreferrer\">Advanced Troubleshooting<\/a><\/p>\n<p>[\/et_pb_toggle][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;2_3&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;ph-button-progress-ctn&#8221; _builder_version=&#8221;4.16&#8243; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; global_colors_info=&#8221;{}&#8221;]<!-- Button Progress Container --><!-- [et_pb_line_break_holder] --><\/p>\n<div class=\"ph-button-progress-ctn\"><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Previous --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-previous\" href=\"\/education\/learn\/projects\/scale-kit\/calculate-weight\/\"><!-- [et_pb_line_break_holder] -->    Back to Calculate Weight<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-next\" href=\"\/education\/learn\/projects\/scale-kit\/capacity\/\"><!-- [et_pb_line_break_holder] -->    Next: Changing Scale Capacity<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][\/et_pb_column][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Load Cell Recommended Weight 780g ~400g 5kg ~2.5kg 25kg ~2.5kg package scalecalibration;\/\/Add Phidgets Libraryimport com.phidget22.*;import java.util.Scanner;public class ScaleCalibration { \/\/Define static VoltageRatioInput scale; public static double getAverage()throws Exception{ double average = 0; int count = 0; System.out.println(&#8220;Averaging Value&#8230;&#8221;); while(count < 64){ average += scale.getVoltageRatio(); count += 1; Thread.sleep(20); } return average\/count; } public static void [&hellip;]\n<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":6573,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<!-- wp:paragraph -->\r\n<p>This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:<\/p>\r\n<!-- \/wp:paragraph --><!-- wp:quote -->\r\n<blockquote class=\"wp-block-quote\">\r\n<p>Hi there! I'm a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi\u00f1a coladas. (And gettin' caught in the rain.)<\/p>\r\n<\/blockquote>\r\n<!-- \/wp:quote --><!-- wp:paragraph -->\r\n<p>...or something like this:<\/p>\r\n<!-- \/wp:paragraph --><!-- wp:quote -->\r\n<blockquote class=\"wp-block-quote\">\r\n<p>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.<\/p>\r\n<\/blockquote>\r\n<!-- \/wp:quote --><!-- wp:paragraph -->\r\n<p>As a new WordPress user, you should go to <a href=\"https:\/\/www.phidgets.com\/education\/wp-admin\/\">your dashboard<\/a> to delete this page and create new pages for your content. Have fun!<\/p>\r\n<!-- \/wp:paragraph -->","_et_gb_content_width":"","footnotes":""},"class_list":["post-6679","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/6679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/comments?post=6679"}],"version-history":[{"count":43,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/6679\/revisions"}],"predecessor-version":[{"id":9442,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/6679\/revisions\/9442"}],"up":[{"embeddable":true,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/6573"}],"wp:attachment":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/media?parent=6679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}