{"id":2647,"date":"2020-08-21T04:32:27","date_gmt":"2020-08-20T21:32:27","guid":{"rendered":"https:\/\/www.phidgets.com\/education\/?page_id=2647"},"modified":"2021-04-29T00:11:33","modified_gmt":"2021-04-28T17:11:33","slug":"attach","status":"publish","type":"page","link":"https:\/\/www.phidgets.com\/education\/learn\/getting-started-kit-tutorial\/attach\/","title":{"rendered":"Getting Started Kit &#8211; Attach Detach"},"content":{"rendered":"<p>[et_pb_section bb_built=&#8221;1&#8243; fullwidth=&#8221;off&#8221; specialty=&#8221;on&#8221; inner_width=&#8221;auto&#8221; inner_max_width=&#8221;1200px&#8221;][et_pb_column type=&#8221;1_3&#8243;][et_pb_code admin_label=&#8221;ph-vertical-menu &#8211; python&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-python&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_1\"><!-- [et_pb_line_break_holder] -->    Button Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_2\/\"><!-- [et_pb_line_break_holder] -->    Button &#038; LED Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"https:\/\/www.phidgets.com\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/attach\/\"><!-- [et_pb_line_break_holder] -->    Attach\/Detach Events<!-- [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=\"#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=\"#practice\"><!-- [et_pb_line_break_holder] -->    Practice<!-- [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 red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Data Interval<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-vertical-menu &#8211; java&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-java&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_1\"><!-- [et_pb_line_break_holder] -->    Button Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_2\/\"><!-- [et_pb_line_break_holder] -->    Button &#038; LED Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"https:\/\/www.phidgets.com\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/attach\/\"><!-- [et_pb_line_break_holder] -->    Attach\/Detach Events<!-- [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=\"#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=\"#practice\"><!-- [et_pb_line_break_holder] -->    Practice<!-- [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 red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Data Interval<!-- [et_pb_line_break_holder] -->  <\/a> <!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-vertical-menu &#8211; C#&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-csharp&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_1\"><!-- [et_pb_line_break_holder] -->    Button Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_2\/\"><!-- [et_pb_line_break_holder] -->    Button &#038; LED Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"https:\/\/www.phidgets.com\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/attach\/\"><!-- [et_pb_line_break_holder] -->    Attach\/Detach Events<!-- [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=\"#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=\"#practice\"><!-- [et_pb_line_break_holder] -->    Practice<!-- [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 red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Data Interval<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-vertical-menu-swift&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-swift&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/attach\/\"><!-- [et_pb_line_break_holder] -->    Attach\/Detach Events<!-- [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=\"#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=\"#practice\"><!-- [et_pb_line_break_holder] -->    Practice<!-- [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 red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Data Interval<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-vertical-menu &#8211; python&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-python&#8221; disabled=&#8221;on&#8221; disabled_on=&#8221;on|on|on&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dutycycle\/\"><!-- [et_pb_line_break_holder] -->    LED Brightness<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-10-closing\/\"><!-- [et_pb_line_break_holder] -->    Closing Phidgets<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_1\"><!-- [et_pb_line_break_holder] -->    Button Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_2\/\"><!-- [et_pb_line_break_holder] -->    Button &#038; LED Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"https:\/\/www.phidgets.com\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/attach\/\"><!-- [et_pb_line_break_holder] -->    Attach\/Detach Events<!-- [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=\"#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=\"#practice\"><!-- [et_pb_line_break_holder] -->    Practice<!-- [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 red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Data Interval<!-- [et_pb_line_break_holder] -->  <\/a>  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/addressing_1\/\"><!-- [et_pb_line_break_holder] -->    Two or More Smart Phidgets<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/addressing_1-2\/\"><!-- [et_pb_line_break_holder] -->    Two or More VINT Hubs<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-9-errors\/\"><!-- [et_pb_line_break_holder] -->    Errors<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-11-sensorapi\/\"><!-- [et_pb_line_break_holder] -->    Using the Sensor API<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-12-phidget-api\/\"><!-- [et_pb_line_break_holder] -->    Using the Phidget API<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-vertical-menu &#8211; java&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-java&#8221; disabled=&#8221;on&#8221; disabled_on=&#8221;on|on|on&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dutycycle\/\"><!-- [et_pb_line_break_holder] -->    LED Brightness<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-10-closing\/\"><!-- [et_pb_line_break_holder] -->    Closing Phidgets<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_1\"><!-- [et_pb_line_break_holder] -->    Button Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_2\/\"><!-- [et_pb_line_break_holder] -->    Button &#038; LED Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"https:\/\/www.phidgets.com\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/attach\/\"><!-- [et_pb_line_break_holder] -->    Attach\/Detach Events<!-- [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=\"#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=\"#practice\"><!-- [et_pb_line_break_holder] -->    Practice<!-- [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 red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Data Interval<!-- [et_pb_line_break_holder] -->  <\/a>  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/addressing_1\/\"><!-- [et_pb_line_break_holder] -->    Two or More Smart Phidgets<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/addressing_1-2\/\"><!-- [et_pb_line_break_holder] -->    Two or More VINT Hubs<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-9-errors\/\"><!-- [et_pb_line_break_holder] -->    Errors<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-11-sensorapi\/\"><!-- [et_pb_line_break_holder] -->    Using the Sensor API<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-12-phidget-api\/\"><!-- [et_pb_line_break_holder] -->    Using the Phidget API<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-vertical-menu &#8211; C#&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-csharp&#8221; disabled=&#8221;on&#8221; disabled_on=&#8221;on|on|on&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dutycycle\/\"><!-- [et_pb_line_break_holder] -->    LED Brightness<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-10-closing\/\"><!-- [et_pb_line_break_holder] -->    Closing Phidgets<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_1\"><!-- [et_pb_line_break_holder] -->    Button Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_2\/\"><!-- [et_pb_line_break_holder] -->    Button &#038; LED Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"https:\/\/www.phidgets.com\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/attach\/\"><!-- [et_pb_line_break_holder] -->    Attach\/Detach Events<!-- [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=\"#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=\"#practice\"><!-- [et_pb_line_break_holder] -->    Practice<!-- [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 red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Data Interval<!-- [et_pb_line_break_holder] -->  <\/a>  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/addressing_1\/\"><!-- [et_pb_line_break_holder] -->    Two or More Smart Phidgets<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/addressing_1-2\/\"><!-- [et_pb_line_break_holder] -->    Two or More VINT Hubs<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-9-errors\/\"><!-- [et_pb_line_break_holder] -->    Errors<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-11-sensorapi\/\"><!-- [et_pb_line_break_holder] -->    Using the Sensor API<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-12-phidget-api\/\"><!-- [et_pb_line_break_holder] -->    Using the Phidget API<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-vertical-menu-swift&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-swift&#8221; disabled=&#8221;on&#8221; disabled_on=&#8221;on|on|on&#8221;]<\/p>\n<div class=\"ph-vertical-menu ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dutycycle\/\"><!-- [et_pb_line_break_holder] -->    LED Brightness<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-10-closing\/\"><!-- [et_pb_line_break_holder] -->    Closing Phidgets<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] -->  <a class=\"ph-vertical-menu-item active red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/attach\/\"><!-- [et_pb_line_break_holder] -->    Attach\/Detach Events<!-- [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=\"#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=\"#practice\"><!-- [et_pb_line_break_holder] -->    Practice<!-- [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 red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Data Interval<!-- [et_pb_line_break_holder] -->  <\/a>  <a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/addressing_1\/\"><!-- [et_pb_line_break_holder] -->    Two or More Smart Phidgets<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/addressing_1-2\/\"><!-- [et_pb_line_break_holder] -->    Two or More VINT Hubs<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-11-sensorapi\/\"><!-- [et_pb_line_break_holder] -->    Using the Sensor API<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><a class=\"ph-vertical-menu-item red\" href=\"\/education\/learn\/getting-started-kit-tutorial\/getting-started-kit-advanced-12-phidget-api\/\"><!-- [et_pb_line_break_holder] -->    Using the Phidget API<!-- [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;2_3&#8243; specialty_columns=&#8221;4&#8243;][et_pb_row_inner _builder_version=&#8221;4.4.5&#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; module_id=&#8221;overview&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Advanced &#8211; Attach\/Detach&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<div class=\"ph-overline-text\"><!-- [et_pb_line_break_holder] -->    <a href=\"\/education\/learn\/getting-started-kit-tutorial\">Getting started tutorial<\/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\">Advanced Lesson<\/div>\n<p><!-- [et_pb_line_break_holder] --><\/p>\n<h1>Attach\/Detach Events<\/h1>\n<p><!-- [et_pb_line_break_holder] --><pee>In this lesson, you will learn how to use attach and detach events so you can keep track of the Phidgets in your programs!<\/pee>[\/et_pb_code][et_pb_image _builder_version=&#8221;4.4.5&#8243; src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2020\/04\/setup-humidity-scaled.jpg&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; align=&#8221;center&#8221; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.4.5&#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; module_id=&#8221;write-code&#8221; module_class=&#8221;ph-hidden-anchor&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Write Code &#8211; row hidden anchor&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.4.5&#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; module_class=&#8221;ph-user-java&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Write code Java&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<h2>Write Code (Java)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Copy the code below into the project you created. If you don&#8217;t have a project or forgot how to create one, revisit the <a href=\"\/education\/learn\/getting-started-kit-tutorial\/configure-ide\/\">Configure section<\/a>.<\/pee><!-- [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 &#8211; Netbeans&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-netbeans&#8221;]<\/p>\n<pre class=\"language-java\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->package gettingstarted;<!-- [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 GettingStarted {<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    public static void main(String[] args) throws Exception {<!-- [et_pb_line_break_holder] -->       <!-- [et_pb_line_break_holder] -->         \/\/Create<!-- [et_pb_line_break_holder] -->        TemperatureSensor temperatureSensor = new TemperatureSensor();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Data Event | Event code runs when data from sensor changes. <!-- [et_pb_line_break_holder] -->        temperatureSensor.addTemperatureChangeListener(new TemperatureSensorTemperatureChangeListener() {<!-- [et_pb_line_break_holder] -->            public void onTemperatureChange(TemperatureSensorTemperatureChangeEvent e) {<!-- [et_pb_line_break_holder] -->                \/\/Print temperature<!-- [et_pb_line_break_holder] -->                System.out.println(\"Temperature: \" + e.getTemperature() + \"\u00b0C\");<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->        });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Attach Event | Attach Events run when a Phidget is connected to the Object<!-- [et_pb_line_break_holder] -->        temperatureSensor.addAttachListener(new AttachListener() {<!-- [et_pb_line_break_holder] -->            public void onAttach(AttachEvent e) {<!-- [et_pb_line_break_holder] -->                System.out.println(\"Attach!\");<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->        });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Detach Event | Detach Events run when a Phidget is disconnected from the Object<!-- [et_pb_line_break_holder] -->        temperatureSensor.addDetachListener(new DetachListener() {<!-- [et_pb_line_break_holder] -->            public void onDetach(DetachEvent e) {<!-- [et_pb_line_break_holder] -->                System.out.println(\"Detach!\");<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->        });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Open<!-- [et_pb_line_break_holder] -->        temperatureSensor.open(1000);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Keep program running<!-- [et_pb_line_break_holder] -->        while (true) {<!-- [et_pb_line_break_holder] -->            Thread.sleep(150);<!-- [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; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-eclipse&#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 GettingStarted {<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    public static void main(String[] args) throws Exception {<!-- [et_pb_line_break_holder] -->       <!-- [et_pb_line_break_holder] -->         \/\/Create<!-- [et_pb_line_break_holder] -->        TemperatureSensor temperatureSensor = new TemperatureSensor();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Data Event | Event code runs when data from sensor changes. <!-- [et_pb_line_break_holder] -->        temperatureSensor.addTemperatureChangeListener(new TemperatureSensorTemperatureChangeListener() {<!-- [et_pb_line_break_holder] -->            public void onTemperatureChange(TemperatureSensorTemperatureChangeEvent e) {<!-- [et_pb_line_break_holder] -->                \/\/Print temperature<!-- [et_pb_line_break_holder] -->                System.out.println(\"Temperature: \" + e.getTemperature() + \"\u00b0C\");<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->        });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Attach Event | Attach Events run when a Phidget is connected to the Object<!-- [et_pb_line_break_holder] -->        temperatureSensor.addAttachListener(new AttachListener() {<!-- [et_pb_line_break_holder] -->            public void onAttach(AttachEvent e) {<!-- [et_pb_line_break_holder] -->                System.out.println(\"Attach!\");<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->        });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Detach Event | Detach Events run when a Phidget is disconnected from the Object<!-- [et_pb_line_break_holder] -->        temperatureSensor.addDetachListener(new DetachListener() {<!-- [et_pb_line_break_holder] -->            public void onDetach(DetachEvent e) {<!-- [et_pb_line_break_holder] -->                System.out.println(\"Detach!\");<!-- [et_pb_line_break_holder] -->            }<!-- [et_pb_line_break_holder] -->        });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Open<!-- [et_pb_line_break_holder] -->        temperatureSensor.open(1000);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Keep program running<!-- [et_pb_line_break_holder] -->        while (true) {<!-- [et_pb_line_break_holder] -->            Thread.sleep(150);<!-- [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; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-processing&#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] -->TemperatureSensor temperatureSensor;<!-- [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] -->    temperatureSensor = new TemperatureSensor();<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    \/\/Data Event | Event code runs when data from sensor changes. <!-- [et_pb_line_break_holder] -->    temperatureSensor.addTemperatureChangeListener(new TemperatureSensorTemperatureChangeListener() {<!-- [et_pb_line_break_holder] -->        public void onTemperatureChange(TemperatureSensorTemperatureChangeEvent e) {<!-- [et_pb_line_break_holder] -->            System.out.println(\"Temperature: \" + e.getTemperature() + \"\u00b0C\");<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    \/\/Attach Event | Attach Events run when a Phidget is connected to the Object<!-- [et_pb_line_break_holder] -->    temperatureSensor.addAttachListener(new AttachListener() {<!-- [et_pb_line_break_holder] -->        public void onAttach(AttachEvent e) {<!-- [et_pb_line_break_holder] -->            System.out.println(\"Attached!\");<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    \/\/Detach Event | Detach Events run when a Phidget is disconnected from the Object<!-- [et_pb_line_break_holder] -->    temperatureSensor.addDetachListener(new DetachListener() {<!-- [et_pb_line_break_holder] -->        public void onDetach(DetachEvent e) {<!-- [et_pb_line_break_holder] -->            System.out.println(\"Detached!\");<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    \/\/Open<!-- [et_pb_line_break_holder] -->    temperatureSensor.open(1000);<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    <!-- [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] -->    delay(150);<!-- [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 admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.4.5&#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; module_class=&#8221;ph-user-python&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Write code Python&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<h2>Write Code (Python)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Copy the code below into the project you created. If you don&#8217;t have a project or forgot how to create one, revisit the <a href=\"\/education\/learn\/getting-started-kit-tutorial\/configure-ide\/\">Configure section<\/a>.<\/pee><!-- [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.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/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.TemperatureSensor import *<!-- [et_pb_line_break_holder] -->import time<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->#Data Event | Event code runs when data from sensor changes. <!-- [et_pb_line_break_holder] -->def onTemperatureSensor0_TemperatureChange(self, temperature):<!-- [et_pb_line_break_holder] -->    print(\"Temperature: \" + str(temperature) + \"\u00b0C\")<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->#Attach Event | Attach Events run when a Phidget is connected to the Object<!-- [et_pb_line_break_holder] -->def onTemperatureSensor0_Attach(self):<!-- [et_pb_line_break_holder] -->    print(\"Attach!\")<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->#Detach Event | Detach Events run when a Phidget is disconnected from the Object<!-- [et_pb_line_break_holder] -->def onTemperatureSensor0_Detach(self):<!-- [et_pb_line_break_holder] -->    print(\"Detach!\")<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->#Create<!-- [et_pb_line_break_holder] -->temperatureSensor = TemperatureSensor()<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->#Subscribe to Data Event<!-- [et_pb_line_break_holder] -->temperatureSensor.setOnTemperatureChangeHandler(onTemperatureSensor0_TemperatureChange)<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->#Subscribe to Attach Event | Subscribe to Events tell your program to start listening to a Phidget. In this case, the program will begin checking to see if your Object and physical Phidget are connected<!-- [et_pb_line_break_holder] -->temperatureSensor.setOnAttachHandler(onTemperatureSensor0_Attach)<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->#Subscribe to Detach Event | Subscribe to Events tell your program to start listening to a Phidget. In this case, the program will begin checking to see if your Object and physical Phidget are disconnected<!-- [et_pb_line_break_holder] -->temperatureSensor.setOnDetachHandler(onTemperatureSensor0_Detach)<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->#Open<!-- [et_pb_line_break_holder] -->temperatureSensor.openWaitForAttachment(1000)<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->#Keep program running<!-- [et_pb_line_break_holder] -->while(True):<!-- [et_pb_line_break_holder] -->    time.sleep(0.15)<!-- [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 admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.4.5&#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; module_class=&#8221;ph-user-csharp&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Write code C#&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<h2>Write Code (C#)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Copy the code below into the project you created. If you don&#8217;t have a project or forgot how to create one, revisit the <a href=\"\/education\/learn\/getting-started-kit-tutorial\/configure-ide\/\">Configure section<\/a>.<\/pee><!-- [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.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/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] -->using Phidget22.Events;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->namespace GettingStarted{<!-- [et_pb_line_break_holder] -->    class Program{<!-- [et_pb_line_break_holder] -->        \/\/Data Event | Event code runs when data from sensor changes. <!-- [et_pb_line_break_holder] -->        private static void TemperatureSensor_TemperatureChange(object sender, Phidget22.Events.TemperatureSensorTemperatureChangeEventArgs e)<!-- [et_pb_line_break_holder] -->        {<!-- [et_pb_line_break_holder] -->            \/\/Print temperature<!-- [et_pb_line_break_holder] -->            System.Console.WriteLine(\"Temperature: \" + e.Temperature + \"\u00b0C\");<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Attach Event | Attach Events run when a Phidget is connected to the Object<!-- [et_pb_line_break_holder] -->        private static void TemperatureSensor_Attach(object sender, Phidget22.Events.AttachEventArgs e)<!-- [et_pb_line_break_holder] -->        {<!-- [et_pb_line_break_holder] -->            System.Console.WriteLine(\"Attach!\");<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/Detach Event | Detach Events run when a Phidget is disconnected from the Object<!-- [et_pb_line_break_holder] -->        private static void TemperatureSensor_Detach(object sender, Phidget22.Events.DetachEventArgs e)<!-- [et_pb_line_break_holder] -->        {<!-- [et_pb_line_break_holder] -->            System.Console.WriteLine(\"Detach!\");<!-- [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] -->            TemperatureSensor temperatureSensor = new TemperatureSensor();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Subscribe to Data Event<!-- [et_pb_line_break_holder] -->            temperatureSensor.TemperatureChange += TemperatureSensor_TemperatureChange;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Subscribe to Attach Event | Subscribe to Events tell your program to start listening to a Phidget. In this case, the program will begin checking to see if your Object and physical Phidget are connected<!-- [et_pb_line_break_holder] -->            temperatureSensor.Attach += TemperatureSensor_Attach;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Subscribe to Detach Event | Subscribe to Events tell your program to start listening to a Phidget. In this case, the program will begin checking to see if your Object and physical Phidget are disconnected<!-- [et_pb_line_break_holder] -->            temperatureSensor.Detach += TemperatureSensor_Detach;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Open<!-- [et_pb_line_break_holder] -->            temperatureSensor.Open(1000);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Keep Program Running          <!-- [et_pb_line_break_holder] -->            while (true)<!-- [et_pb_line_break_holder] -->            {<!-- [et_pb_line_break_holder] -->                System.Threading.Thread.Sleep(150);<!-- [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 admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.4.5&#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; module_class=&#8221;ph-user-swift&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Write code Swift&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<h2>Write Code (Swift)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Create two labels in your window and copy the code below into the project you created. If you don&#8217;t have a project or forgot how to create one, revisit the <a href=\"\/education\/learn\/getting-started-kit-tutorial\/configure-ide\/\">Configure section<\/a>.<\/pee><!-- [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] --><pee><strong>Create two labels<\/strong><\/pee>[\/et_pb_code][et_pb_image _builder_version=&#8221;4.4.5&#8243; src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2020\/09\/swift_advanced_attach.png&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; align=&#8221;center&#8221; width=&#8221;50%&#8221; show_in_lightbox=&#8221;on&#8221; \/][et_pb_code admin_label=&#8221;Code Sample&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<pre class=\"language-swift\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> import Cocoa<!-- [et_pb_line_break_holder] -->\/\/Add Phidgets Library | You used cocoapods to install the Phidget library. The statement below give your program access to that code.<!-- [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] -->    <!-- [et_pb_line_break_holder] -->    @IBOutlet weak var attachedLabel: NSTextField!<!-- [et_pb_line_break_holder] -->    @IBOutlet weak var temperatureLabel: NSTextField!<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    \/\/Create | Here you have created a TemperatureSensor object. TemperatureSensor is a class in your Phidgets library that gathers temperature data from your Phidget.<!-- [et_pb_line_break_holder] -->    let temperatureSensor = TemperatureSensor()<!-- [et_pb_line_break_holder] -->    <!-- [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 events<!-- [et_pb_line_break_holder] -->            let _ = temperatureSensor.attach.addHandler(onAttach)<!-- [et_pb_line_break_holder] -->            let _ = temperatureSensor.detach.addHandler(onDetach)<!-- [et_pb_line_break_holder] -->            let _ = temperatureSensor.temperatureChange.addHandler(onTemperatureChange)<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/Open | Open establishes a connection between your object and your physical Phidget.<!-- [et_pb_line_break_holder] -->            try temperatureSensor.open()<!-- [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] -->    \/\/Data event<!-- [et_pb_line_break_holder] -->    func onTemperatureChange(sender:TemperatureSensor, temperature: Double){<!-- [et_pb_line_break_holder] -->        DispatchQueue.main.async {<!-- [et_pb_line_break_holder] -->            \/\/Use your Phidget | Update the label with the latest temperature data.<!-- [et_pb_line_break_holder] -->            self.temperatureLabel.stringValue = String(temperature) + \"\u00b0C\"<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    \/\/Attach event<!-- [et_pb_line_break_holder] -->    func onAttach(sender:Phidget){<!-- [et_pb_line_break_holder] -->        DispatchQueue.main.async {<!-- [et_pb_line_break_holder] -->            \/\/Update the label with the attached status.<!-- [et_pb_line_break_holder] -->            self.attachedLabel.stringValue = \"Attached!\"<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    \/\/Detach event<!-- [et_pb_line_break_holder] -->    func onDetach(sender:Phidget){<!-- [et_pb_line_break_holder] -->        DispatchQueue.main.async {<!-- [et_pb_line_break_holder] -->            \/\/Update the label with the attached status<!-- [et_pb_line_break_holder] -->            self.attachedLabel.stringValue = \"Detached!\"<!-- [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 admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.6.6&#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; module_id=&#8221;run-program&#8221; module_class=&#8221;ph-hidden-anchor&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Run Program &#8211; row hidden anchor&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.4.5&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Run Program&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<h2>Run Your Program<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>You will immediately see an attach event fire, and then you will see the temperature displayed in degrees Celsius.<\/pee>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;When should I use Attach\/Detach events?&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<h3>When should I use Attach\/Detach events?<\/h3>\n<p><!-- [et_pb_line_break_holder] --><pee>These events are useful if you need to attach and detach Phidgets while your program is running, disable or enable program features, or monitor the connection to your Phidgets. For example, if you made a video game that used Phidgets as input (<a href=\"https:\/\/youtu.be\/Su1-xXq_iR0\" target=\"_blank\" rel=\"noopener noreferrer\">something like this<\/a>), you would want to know if a device got disconnected so you could pause your game!<\/pee>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.4.5&#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; module_id=&#8221;practice&#8221; module_class=&#8221;ph-hidden-anchor&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Practice &#8211; row hidden anchor&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;Practice&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<h2>Practice<\/h2>\n<p><!-- [et_pb_line_break_holder] --><\/p>\n<ol><!-- [et_pb_line_break_holder] -->    <\/p>\n<li>Run the code sample. Disconnect and reconnect your USB cable while the code is running. Note what happens.<\/li>\n<p><!-- [et_pb_line_break_holder] --><\/p>\n<li>All Phidgets have Attach and Detach Events. Modify your code to add an LED and Button. Add an Attach and Detach Events for the LED and button. In each Attach Event, print \u201cAttach\u201d plus the component that is attached. For each Detach Event, print \u201cDetach\u201d plus the component.<\/li>\n<p><!-- [et_pb_line_break_holder] --><\/ol>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;Email for Solutions&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; saved_tabs=&#8221;all&#8221; global_module=&#8221;4139&#8243;]<pee><i>Solutions available for educators. <a href=\"mailto:education@phidgets.com\">Email us for access.<\/a><\/i><\/pee>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_id=&#8221;troubleshoot&#8221;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_toggle admin_label=&#8221;Troubleshoot&#8221; _builder_version=&#8221;4.4.3&#8243; title=&#8221;Troubleshoot&#8221; text_shadow_horizontal_length=&#8221;text_shadow_style,%91object Object%93&#8243; text_shadow_horizontal_length_tablet=&#8221;0px&#8221; text_shadow_vertical_length=&#8221;text_shadow_style,%91object Object%93&#8243; text_shadow_vertical_length_tablet=&#8221;0px&#8221; text_shadow_blur_strength=&#8221;text_shadow_style,%91object Object%93&#8243; text_shadow_blur_strength_tablet=&#8221;1px&#8221; title_text_shadow_horizontal_length=&#8221;title_text_shadow_style,%91object Object%93&#8243; title_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; title_text_shadow_vertical_length=&#8221;title_text_shadow_style,%91object Object%93&#8243; title_text_shadow_vertical_length_tablet=&#8221;0px&#8221; title_text_shadow_blur_strength=&#8221;title_text_shadow_style,%91object Object%93&#8243; title_text_shadow_blur_strength_tablet=&#8221;1px&#8221; closed_title_text_shadow_horizontal_length=&#8221;closed_title_text_shadow_style,%91object Object%93&#8243; closed_title_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; closed_title_text_shadow_vertical_length=&#8221;closed_title_text_shadow_style,%91object Object%93&#8243; closed_title_text_shadow_vertical_length_tablet=&#8221;0px&#8221; closed_title_text_shadow_blur_strength=&#8221;closed_title_text_shadow_style,%91object Object%93&#8243; closed_title_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_text_shadow_horizontal_length=&#8221;body_text_shadow_style,%91object Object%93&#8243; body_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_text_shadow_vertical_length=&#8221;body_text_shadow_style,%91object Object%93&#8243; body_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_text_shadow_blur_strength=&#8221;body_text_shadow_style,%91object Object%93&#8243; body_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_link_text_shadow_horizontal_length=&#8221;body_link_text_shadow_style,%91object Object%93&#8243; body_link_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_link_text_shadow_vertical_length=&#8221;body_link_text_shadow_style,%91object Object%93&#8243; body_link_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_link_text_shadow_blur_strength=&#8221;body_link_text_shadow_style,%91object Object%93&#8243; body_link_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_ul_text_shadow_horizontal_length=&#8221;body_ul_text_shadow_style,%91object Object%93&#8243; body_ul_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_ul_text_shadow_vertical_length=&#8221;body_ul_text_shadow_style,%91object Object%93&#8243; body_ul_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_ul_text_shadow_blur_strength=&#8221;body_ul_text_shadow_style,%91object Object%93&#8243; body_ul_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_ol_text_shadow_horizontal_length=&#8221;body_ol_text_shadow_style,%91object Object%93&#8243; body_ol_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_ol_text_shadow_vertical_length=&#8221;body_ol_text_shadow_style,%91object Object%93&#8243; body_ol_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_ol_text_shadow_blur_strength=&#8221;body_ol_text_shadow_style,%91object Object%93&#8243; body_ol_text_shadow_blur_strength_tablet=&#8221;1px&#8221; body_quote_text_shadow_horizontal_length=&#8221;body_quote_text_shadow_style,%91object Object%93&#8243; body_quote_text_shadow_horizontal_length_tablet=&#8221;0px&#8221; body_quote_text_shadow_vertical_length=&#8221;body_quote_text_shadow_style,%91object Object%93&#8243; body_quote_text_shadow_vertical_length_tablet=&#8221;0px&#8221; body_quote_text_shadow_blur_strength=&#8221;body_quote_text_shadow_style,%91object Object%93&#8243; 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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243;]<\/p>\n<p><strong>I am getting a &#8220;Timed Out&#8221; exception.<\/strong><\/p>\n<ol>\n<li>Make sure the USB cable from your VINT Hub to your computer is attached properly.<\/li>\n<li>Make the Phidget cable (the black, red and white one) is connected to your VINT Hub and to your Humidity Phidget properly).<\/li>\n<li>Make sure no other program is running that uses Phidgets. If a Phidget is already in use in another program, it will be busy and won&#8217;t respond to this one.<\/li>\n<\/ol>\n<p><strong>Still having issues?<\/strong><\/p>\n<p>Visit the <a href=\"\/education\/learn\/advanced-troubleshooting\/\" target=\"_blank\" rel=\"noopener noreferrer\">Advanced Troubleshooting Page<\/a> or contact us (education@phidgets.com).<\/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.4.3&#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; disabled_on=&#8221;on|on|on&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;ph-button-cta: Finish&#8221; _builder_version=&#8221;4.4.1&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<!-- Button CTA --><!-- [et_pb_line_break_holder] --><a class=\"ph-button-cta\" href=\"\/education\/learn\/getting-started-kit-tutorial#smart-phidgets-step\"><!-- [et_pb_line_break_holder] -->  <\/p>\n<div class=\"ph-button-cta__icon\"><\/div>\n<p><!-- [et_pb_line_break_holder] -->  Finish<!-- [et_pb_line_break_holder] --><\/a>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; disabled_on=&#8221;off|off|off&#8221; disabled=&#8221;off&#8221; _builder_version=&#8221;4.4.3&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;2_3&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;2_3&#8243;][et_pb_code admin_label=&#8221;ph-button-progress-ctn &#8211; python&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-python&#8221;]<!-- Button Progress Container --><!-- [et_pb_line_break_holder] --><\/p>\n<div class=\"ph-button-progress-ctn\"><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-previous-adv\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Back to Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-next-adv\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Next: Data Interval<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-button-progress-ctn &#8211; java&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-java&#8221;]<!-- Button Progress Container --><!-- [et_pb_line_break_holder] --><\/p>\n<div class=\"ph-button-progress-ctn\"><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-previous-adv\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Back to Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-next-adv\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Next: Data Interval<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-button-progress-ctn &#8211; C#&#8221; _builder_version=&#8221;4.4.5&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-csharp&#8221;]<!-- Button Progress Container --><!-- [et_pb_line_break_holder] --><\/p>\n<div class=\"ph-button-progress-ctn\"><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-previous-adv\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_3\/\"><!-- [et_pb_line_break_holder] -->    Back to Smart Phidget Events<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-next-adv\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Next: Data Interval<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-button-progress-ctn &#8211; swift&#8221; _builder_version=&#8221;4.6.6&#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; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_class=&#8221;ph-user-swift&#8221;]<!-- Button Progress Container --><!-- [et_pb_line_break_holder] --><\/p>\n<div class=\"ph-button-progress-ctn\"><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-previous-adv\" href=\"\/education\/learn\/getting-started-kit-tutorial\/\"><!-- [et_pb_line_break_holder] -->    Back to Getting Started Kit Tutorial<!-- [et_pb_line_break_holder] -->  <\/a><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <!-- Button Progress Next --><!-- [et_pb_line_break_holder] -->  <a class=\"ph-button-progress-next-adv\" href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\"><!-- [et_pb_line_break_holder] -->    Next: Data Interval<!-- [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>package gettingstarted;\/\/Add Phidgets Libraryimport com.phidget22.*;public class GettingStarted { public static void main(String[] args) throws Exception { \/\/Create TemperatureSensor temperatureSensor = new TemperatureSensor(); \/\/Data Event | Event code runs when data from sensor changes. temperatureSensor.addTemperatureChangeListener(new TemperatureSensorTemperatureChangeListener() { public void onTemperatureChange(TemperatureSensorTemperatureChangeEvent e) { \/\/Print temperature System.out.println(&#8220;Temperature: &#8221; + e.getTemperature() + &#8220;\u00b0C&#8221;); } }); \/\/Attach Event | Attach [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":309,"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-2647","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/2647","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=2647"}],"version-history":[{"count":37,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/2647\/revisions"}],"predecessor-version":[{"id":5395,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/2647\/revisions\/5395"}],"up":[{"embeddable":true,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/309"}],"wp:attachment":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/media?parent=2647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}