{"id":6208,"date":"2021-07-15T01:33:44","date_gmt":"2021-07-14T18:33:44","guid":{"rendered":"https:\/\/www.phidgets.com\/education\/?page_id=6208"},"modified":"2022-12-14T02:25:08","modified_gmt":"2022-12-13T19:25:08","slug":"motion-sensor","status":"publish","type":"page","link":"https:\/\/www.phidgets.com\/education\/learn\/device-tutorials\/motion-sensor\/","title":{"rendered":"Motion Sensor Phidget"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_row column_structure=&#8221;1_2,1_2&#8243; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;1_2&#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;Motion Sensor Phidget&#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-has-adjacent-panel\"><!-- [et_pb_line_break_holder] -->  <\/p>\n<div class=\"ph-overline-text\"><a href=\"\/education\/learn\/device-tutorials\">Device tutorials<\/a><\/div>\n<p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <\/p>\n<h1>Motion Sensor Phidget<\/h1>\n<p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <pee>The Motion Sensor Phidget allows you to detect motion up to ten meters away (approximately 30 feet).<!\u2013- [et_pb_br_holder] -\u2013><!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] -->\u200b<!-- [et_pb_line_break_holder] -->This Phidget returns a constant voltage when no objects are detected. When motion is detected, the voltage will increase or decrease. <\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><a class=\"ph-button-link\" href=\"#tutorial\"><!-- [et_pb_line_break_holder] -->  <\/p>\n<div class=\"ph-button-link__icon\"><\/div>\n<p><!-- [et_pb_line_break_holder] -->  See tutorial<!-- [et_pb_line_break_holder] --><\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][\/et_pb_column][et_pb_column type=&#8221;1_2&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2021\/07\/device-mot2002.png&#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_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; use_custom_gutter=&#8221;on&#8221; gutter_width=&#8221;3&#8243; specialty=&#8221;on&#8221; module_id=&#8221;tutorial&#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 type=&#8221;1_4&#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-nav&#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<div class=\"ph-vertical-nav ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a href=\"#setup\" class=\"ph-vertical-nav-item active\">Setup<\/a><!-- [et_pb_line_break_holder] -->  <a href=\"#write-code\" class=\"ph-vertical-nav-item\">Code<\/a><!-- [et_pb_line_break_holder] -->  <a href=\"#applications\" class=\"ph-vertical-nav-item\">Applications<\/a><!-- [et_pb_line_break_holder] -->  <a href=\"#practice\" class=\"ph-vertical-nav-item\">Practice<\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][\/et_pb_column][et_pb_column type=&#8221;3_4&#8243; specialty_columns=&#8221;3&#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;setup&#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;3_4&#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;Setup&#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<h3>Setup<\/h3>\n<p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Before you do any coding you will have to attach your Motion Sensor Phidget to your VINT hub as shown:<\/pee>[\/et_pb_code][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2022\/12\/MOT2002_Setup_whitecable.jpg&#8221; title_text=&#8221;MOT2002_Setup_whitecable&#8221; show_in_lightbox=&#8221;on&#8221; _builder_version=&#8221;4.19.2&#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; sticky_enabled=&#8221;0&#8243;][\/et_pb_image][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner module_id=&#8221;write-code&#8221; module_class=&#8221;ph-hidden-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; 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;3_4&#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 &#8211; row hidden 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; 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_code][\/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;3_4&#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;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; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h3>Code (Java)<\/h3>\n<p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Create a file called <em>Motion<\/em> and add the following code. Run your code. Move your hand over the motion sensor to see the value change. <\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Not your programming language? <a class=\"ph-toggle-settings\">Set my language and IDE<\/a>.<\/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] -->package motion;<!-- [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] --><!-- [et_pb_line_break_holder] -->public class Motion {<!-- [et_pb_line_break_holder] -->    public static void main(String[] args) throws Exception{<!-- [et_pb_line_break_holder] -->        \/\/Create<!-- [et_pb_line_break_holder] -->        VoltageInput motionSensor = new VoltageInput();<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Address<!-- [et_pb_line_break_holder] -->        motionSensor.setHubPort(0);<!-- [et_pb_line_break_holder] -->        motionSensor.setIsHubPortDevice(true);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Open<!-- [et_pb_line_break_holder] -->        motionSensor.open(1000);<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Use your Phidget<!-- [et_pb_line_break_holder] -->        while (true) {<!-- [et_pb_line_break_holder] -->            System.out.println(\"Motion Value: \" + motionSensor.getVoltage());<!-- [et_pb_line_break_holder] -->            Thread.sleep(250);<!-- [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_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] --><!-- [et_pb_line_break_holder] -->public class Motion {<!-- [et_pb_line_break_holder] -->    public static void main(String[] args) throws Exception{<!-- [et_pb_line_break_holder] -->        \/\/Create<!-- [et_pb_line_break_holder] -->        VoltageInput motionSensor = new VoltageInput();<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Address<!-- [et_pb_line_break_holder] -->        motionSensor.setHubPort(0);<!-- [et_pb_line_break_holder] -->        motionSensor.setIsHubPortDevice(true);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Open<!-- [et_pb_line_break_holder] -->        motionSensor.open(1000);<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->        \/\/Use your Phidget<!-- [et_pb_line_break_holder] -->        while (true) {<!-- [et_pb_line_break_holder] -->            System.out.println(\"Motion Value: \" + motionSensor.getVoltage());<!-- [et_pb_line_break_holder] -->            Thread.sleep(250);<!-- [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_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] -->\/\/Add Phidgets Library<!-- [et_pb_line_break_holder] -->import com.phidget22.*;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->\/\/Define<!-- [et_pb_line_break_holder] -->VoltageInput motionSensor;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->void setup(){<!-- [et_pb_line_break_holder] -->  try{<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    \/\/Create<!-- [et_pb_line_break_holder] -->    motionSensor = new VoltageInput();<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    \/\/Address<!-- [et_pb_line_break_holder] -->    motionSensor.setHubPort(0);<!-- [et_pb_line_break_holder] -->    motionSensor.setIsHubPortDevice(true);<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    \/\/Open<!-- [et_pb_line_break_holder] -->    motionSensor.open(1000);<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->  }catch(Exception e){<!-- [et_pb_line_break_holder] -->    e.printStackTrace();<!-- [et_pb_line_break_holder] -->  }<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->void draw(){<!-- [et_pb_line_break_holder] -->  try{<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    \/\/Use your Phidgets<!-- [et_pb_line_break_holder] -->    println(\"Motion Value: \" + motionSensor.getVoltage() + \" V\");<!-- [et_pb_line_break_holder] -->    delay(250);<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->  }catch(Exception e){<!-- [et_pb_line_break_holder] -->    e.printStackTrace();<!-- [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_id=&#8221;write-code&#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;3_4&#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;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; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h3>Code (Python)<\/h3>\n<p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Create a file called <em>Motion<\/em> and add the following code. Run your code. Move your hand over the motion sensor to see the value change. <\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Not your programming language? <a class=\"ph-toggle-settings\">Set my language and IDE<\/a>.<\/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.VoltageInput 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] -->#Create<!-- [et_pb_line_break_holder] -->motionSensor = VoltageInput()<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Address<!-- [et_pb_line_break_holder] -->motionSensor.setHubPort(0)<!-- [et_pb_line_break_holder] -->motionSensor.setIsHubPortDevice(True)<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Open<!-- [et_pb_line_break_holder] -->motionSensor.openWaitForAttachment(1000)<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Use your Phidgets<!-- [et_pb_line_break_holder] -->while (True):<!-- [et_pb_line_break_holder] -->    print(\"Motion Value: \" + str(motionSensor.getVoltage()) + \" V\") <!-- [et_pb_line_break_holder] -->    time.sleep(0.25)<!-- [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_id=&#8221;write-code&#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;3_4&#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;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; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h3>Code (C#)<\/h3>\n<p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Create a file called <em>Motion<\/em> and add the following code. Run your code. Move your hand over the motion sensor to see the value change. <\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Not your programming language? <a class=\"ph-toggle-settings\">Set my language and IDE<\/a>.<\/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 Motion<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->    class Program<!-- [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] --><!-- [et_pb_line_break_holder] -->            \/\/Create<!-- [et_pb_line_break_holder] -->            VoltageInput motionSensor= new VoltageInput();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Address<!-- [et_pb_line_break_holder] -->            motionSensor.HubPort = 0;<!-- [et_pb_line_break_holder] -->            motionSensor.IsHubPortDevice = true;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Open<!-- [et_pb_line_break_holder] -->            motionSensor.Open(1000);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Use your Phidgets<!-- [et_pb_line_break_holder] -->            while (true)<!-- [et_pb_line_break_holder] -->            {<!-- [et_pb_line_break_holder] -->                System.Console.WriteLine(\"Motion Value: \" + motionSensor.Voltage);<!-- [et_pb_line_break_holder] -->                System.Threading.Thread.Sleep(250);<!-- [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] -->  <\/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_id=&#8221;write-code&#8221; 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;3_4&#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;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; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h3>Code (Swift)<\/h3>\n<p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Create a file called <em>Motion<\/em> and add the following code. Run your code. Move your hand over the motion sensor to see the value change.<\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Not your programming language? <a class=\"ph-toggle-settings\">Set my language and IDE<\/a>.<\/pee><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>Add two buttons.<\/pee>[\/et_pb_code][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2020\/04\/switch-1.png&#8221; disabled_on=&#8221;on|on|on&#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; disabled=&#8221;on&#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;]<!-- Device tutorials: switch --><!-- [et_pb_line_break_holder] --><\/p>\n<pre class=\"language-swift\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->Coming Soon!<!-- [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_id=&#8221;applications&#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;3_4&#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;Applications&#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<h3>Applications<\/h3>\n<p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><pee>The Motion Sensing Phidget uses infrared light to detect motion. Motion sensors commonly used as an integrated component of security systems and lighting control systems. <\/pee>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner column_structure=&#8221;1_3,1_3,1_3&#8243; 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 type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2020\/04\/switch-2.jpg&#8221; disabled_on=&#8221;on|on|on&#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; disabled=&#8221;on&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][\/et_pb_column_inner][et_pb_column_inner type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2021\/07\/motion_sensor_example.jpg&#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_column_inner][et_pb_column_inner type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_image src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2020\/04\/switch-4.jpg&#8221; disabled_on=&#8221;on|on|on&#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; disabled=&#8221;on&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner module_id=&#8221;practice&#8221; module_class=&#8221;ph-hidden-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; 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;3_4&#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;Practice &#8211; row hidden 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; 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_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner module_id=&#8221;practice&#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;3_4&#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;Practice&#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<h3>Practice<\/h3>\n<p><!-- [et_pb_line_break_holder] --><pee>Use the Motion Sensing Phidget to create a mock security system.  If an object is detected, blink the red LED. If there is no movement, the green LED should stay on.<\/pee>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;off|off|off&#8221; module_id=&#8221;documentation&#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;3_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_text admin_label=&#8221;API Disclaimer&#8221; _builder_version=&#8221;4.6.6&#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_module=&#8221;3821&#8243; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p>Check out the advanced lesson <a href=\"https:\/\/www.phidgets.com\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-11-sensorapi\/\" target=\"_blank\" rel=\"noopener noreferrer\">Using the Sensor API<\/a> before you use the API for the first time.<\/p>\n<p>[\/et_pb_text][et_pb_toggle title=&#8221;API&#8221; admin_label=&#8221;API&#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<p>\nThis device doesn&#8217;t have an API of its own. It is controlled by opening a VoltageInput on a VINT Hub.<\/p>\n<p>[\/et_pb_toggle][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner disabled_on=&#8221;on|on|on&#8221; module_id=&#8221;troubleshoot&#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; disabled=&#8221;on&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column_inner saved_specialty_column_type=&#8221;3_4&#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\n<\/li>\n<li>Stop running other programs that are using your Phidgets before running a program.<\/li>\n<\/ol>\n<p>If these do not solve your issue visit the <a href=\"\/education\/learn\/advanced-troubleshooting\/ \" target=\"_blank\" rel=\"noopener noreferrer\">Advanced Troubleshooting Page<\/a>.<\/p>\n<p>[\/et_pb_toggle][\/et_pb_column_inner][\/et_pb_row_inner][\/et_pb_column][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>package motion;\/\/Add Phidgets Libraryimport com.phidget22.*;public class Motion { public static void main(String[] args) throws Exception{ \/\/Create VoltageInput motionSensor = new VoltageInput(); \/\/Address motionSensor.setHubPort(0); motionSensor.setIsHubPortDevice(true); \/\/Open motionSensor.open(1000); \/\/Use your Phidget while (true) { System.out.println(&#8220;Motion Value: &#8221; + motionSensor.getVoltage()); Thread.sleep(250); } }} \/\/Add Phidgets Libraryimport com.phidget22.*;public class Motion { public static void main(String[] args) throws Exception{ \/\/Create [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":623,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-6208","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/6208","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=6208"}],"version-history":[{"count":11,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/6208\/revisions"}],"predecessor-version":[{"id":9272,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/6208\/revisions\/9272"}],"up":[{"embeddable":true,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/623"}],"wp:attachment":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/media?parent=6208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}