{"id":2590,"date":"2021-10-22T17:57:24","date_gmt":"2021-10-22T17:57:24","guid":{"rendered":"https:\/\/mc.scsiraidguru.com\/?page_id=2590"},"modified":"2024-03-03T23:40:59","modified_gmt":"2024-03-03T23:40:59","slug":"button-pull-up-and-pull-down","status":"publish","type":"page","link":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/","title":{"rendered":"Pi_Button: Pull-Up and Pull-Down"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2590\" class=\"elementor elementor-2590\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-56ec040 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"56ec040\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7371422\" data-id=\"7371422\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8d4c655 elementor-widget elementor-widget-text-editor\" data-id=\"8d4c655\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Included in the gpiozero button class is seting\u00a0<\/p><p><em class=\"property\">class\u00a0<\/em><code class=\"descclassname\">gpiozero.<\/code><code class=\"descname\"><span class=\"highlighted\">Button<\/span><\/code><span class=\"sig-paren\">(<\/span><em>pin<\/em>,\u00a0<em>*<\/em>,\u00a0<em>pull_up=True<\/em>,\u00a0<em>active_state=None<\/em>,\u00a0<em>bounce_time=None<\/em>,\u00a0<em>hold_time=1<\/em>,\u00a0<em>hold_repeat=False<\/em>,\u00a0<em>pin_factory=None<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"https:\/\/gpiozero.readthedocs.io\/en\/stable\/_modules\/gpiozero\/input_devices.html#Button\"><span class=\"viewcode-link\">[source]<\/span><\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f0011f7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f0011f7\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-103cb87\" data-id=\"103cb87\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7f63593 elementor-widget elementor-widget-text-editor\" data-id=\"7f63593\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It has two buttons:\u00a0 Left is Pull Up.\u00a0 Right is Pull Down.\u00a0 \u00a0How do you tell the difference?\u00a0 \u00a0Well, Pull up has ground on the button and GPIO18 is where the power is provided from.\u00a0 \u00a0The Right Button, has 3.3V going into the button and Pull-down to ground on the other side.\u00a0\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-02e15c1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"02e15c1\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-11384b8\" data-id=\"11384b8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-10b6800 elementor-widget elementor-widget-image\" data-id=\"10b6800\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img data-opt-id=1589539337  fetchpriority=\"high\" decoding=\"async\" width=\"300\" height=\"170\" src=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:300\/h:170\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg\" class=\"attachment-medium size-medium wp-image-2592\" alt=\"\" srcset=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:1486\/h:843\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg 1486w, https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:300\/h:170\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg 300w, https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:1024\/h:581\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg 1024w, https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:768\/h:436\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg 768w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1e3a57f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1e3a57f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7361dcf\" data-id=\"7361dcf\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f1d64f3 elementor-widget elementor-widget-text-editor\" data-id=\"f1d64f3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Pull Up Button not pressed<br \/>Pull Down Button not pressed<br \/>Pull Up Button not pressed<br \/>Pull Down Button not pressed<br \/>*** Pull Up Button is pressed ***<br \/>Pull Down Button not pressed<br \/>Pull Up Button not pressed<br \/>Pull Down Button not pressed<br \/>Pull Up Button not pressed<br \/>Pull Down Button not pressed<br \/>Pull Up Button not pressed<br \/>Pull Down Button not pressed<br \/>Pull Up Button not pressed<br \/>*** Pull Down Button is pressed ***<br \/>Pull Up Button not pressed<br \/>Pull Down Button not pressed<br \/>Pull Up Button not pressed<br \/>Pull Down Button not pressed<br \/>Pull Up Button not pressed<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7916ead elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7916ead\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cad61b\" data-id=\"7cad61b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8f20466 elementor-widget elementor-widget-text-editor\" data-id=\"8f20466\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>I added on GPIO 17 a LED that turns on when Pull Up Button is pressed and turns off when the Pull Up button is released.\u00a0 I could add a second LED for the Pull Down Button.\u00a0 <\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-884972a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"884972a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2548e69\" data-id=\"2548e69\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9972006 elementor-widget elementor-widget-image\" data-id=\"9972006\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button_pull_up_pull_down_led.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"button_pull_up_pull_down_led\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjYwOCwidXJsIjoiaHR0cHM6XC9cL21jLnNjc2lyYWlkZ3VydS5jb21cL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjFcLzEwXC9idXR0b25fcHVsbF91cF9wdWxsX2Rvd25fbGVkLmpwZyJ9\">\n\t\t\t\t\t\t\t<img data-opt-id=670754046  fetchpriority=\"high\" decoding=\"async\" width=\"300\" height=\"171\" src=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:300\/h:171\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button_pull_up_pull_down_led.jpg\" class=\"attachment-medium size-medium wp-image-2608\" alt=\"\" srcset=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:1482\/h:847\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button_pull_up_pull_down_led.jpg 1482w, https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:300\/h:171\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button_pull_up_pull_down_led.jpg 300w, https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:1024\/h:585\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button_pull_up_pull_down_led.jpg 1024w, https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:768\/h:439\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button_pull_up_pull_down_led.jpg 768w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-8a04484 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"8a04484\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5bfdb41\" data-id=\"5bfdb41\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e27aa4d elementor-widget elementor-widget-text-editor\" data-id=\"e27aa4d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>from gpiozero import Button, LED\nfrom time import sleep\npu_led_red = LED(17)\npu_button = Button(18, pull_up=True)\npd_button = Button(24, pull_up=False)\n\nwhile True:\n    if pu_button.is_pressed:\n        print(\"*** Pull Up Button is pressed ***\")\n        pu_led_red.on()\n    else:\n        print(\"Pull Up Button not pressed\")\n        pu_led_red.off()\n    sleep(2)\n    if pd_button.is_pressed:\n        print(\"*** Pull Down Button is pressed ***\")\n    else:\n        print(\"Pull Down Button not pressed\")\n    sleep(2)<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Included in the gpiozero button class is seting\u00a0 class\u00a0gpiozero.Button(pin,\u00a0*,\u00a0pull_up=True,\u00a0active_state=None,\u00a0bounce_time=None,\u00a0hold_time=1,\u00a0hold_repeat=False,\u00a0pin_factory=None)[source] It has two buttons:\u00a0 Left is Pull Up.\u00a0 Right is Pull Down.\u00a0 \u00a0How do you tell the difference?\u00a0 \u00a0Well, Pull up has ground on the button and GPIO18 is where the power is provided from.\u00a0 \u00a0The Right Button, has 3.3V going into the button and Pull-down [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":85,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"custom","ocean_center_header_left_menu":"0","ocean_custom_header_template":"7142","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","osh_disable_topbar_sticky":"default","osh_disable_header_sticky":"default","osh_sticky_header_style":"default","osh_sticky_header_effect":"","osh_custom_sticky_logo":0,"osh_custom_retina_sticky_logo":0,"osh_custom_sticky_logo_height":0,"osh_background_color":"","osh_links_color":"","osh_links_hover_color":"","osh_links_active_color":"","osh_links_bg_color":"","osh_links_hover_bg_color":"","osh_links_active_bg_color":"","osh_menu_social_links_color":"","osh_menu_social_hover_links_color":"","footnotes":""},"class_list":["post-2590","page","type-page","status-publish","hentry","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pi_Button: Pull-Up and Pull-Down -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pi_Button: Pull-Up and Pull-Down -\" \/>\n<meta property=\"og:description\" content=\"Included in the gpiozero button class is seting\u00a0 class\u00a0gpiozero.Button(pin,\u00a0*,\u00a0pull_up=True,\u00a0active_state=None,\u00a0bounce_time=None,\u00a0hold_time=1,\u00a0hold_repeat=False,\u00a0pin_factory=None)[source] It has two buttons:\u00a0 Left is Pull Up.\u00a0 Right is Pull Down.\u00a0 \u00a0How do you tell the difference?\u00a0 \u00a0Well, Pull up has ground on the button and GPIO18 is where the power is provided from.\u00a0 \u00a0The Right Button, has 3.3V going into the button and Pull-down [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-03T23:40:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:300\/h:170\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/button-pull-up-and-pull-down\\\/\",\"url\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/button-pull-up-and-pull-down\\\/\",\"name\":\"Pi_Button: Pull-Up and Pull-Down -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/button-pull-up-and-pull-down\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/button-pull-up-and-pull-down\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/10\\/button-300x170.jpg\",\"datePublished\":\"2021-10-22T17:57:24+00:00\",\"dateModified\":\"2024-03-03T23:40:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/button-pull-up-and-pull-down\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/button-pull-up-and-pull-down\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/button-pull-up-and-pull-down\\\/#primaryimage\",\"url\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/10\\/button.jpg\",\"contentUrl\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/10\\/button.jpg\",\"width\":1486,\"height\":843},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/button-pull-up-and-pull-down\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Raspberry Pi\",\"item\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Pi_Button: Pull-Up and Pull-Down\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/#website\",\"url\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/\",\"name\":\"SCSIraidGURU MC World\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/#\\\/schema\\\/person\\\/f21e3238456a7c2adea5944cb376cddc\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/#\\\/schema\\\/person\\\/f21e3238456a7c2adea5944cb376cddc\",\"name\":\"Michael McKenney\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/09\\/20210925_105558.jpg\",\"url\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/09\\/20210925_105558.jpg\",\"contentUrl\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/09\\/20210925_105558.jpg\",\"width\":2560,\"height\":1440,\"caption\":\"Michael McKenney\"},\"logo\":{\"@id\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/09\\/20210925_105558.jpg\"},\"sameAs\":[\"http:\\\/\\\/mc.scsiraidguru.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pi_Button: Pull-Up and Pull-Down -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/","og_locale":"en_US","og_type":"article","og_title":"Pi_Button: Pull-Up and Pull-Down -","og_description":"Included in the gpiozero button class is seting\u00a0 class\u00a0gpiozero.Button(pin,\u00a0*,\u00a0pull_up=True,\u00a0active_state=None,\u00a0bounce_time=None,\u00a0hold_time=1,\u00a0hold_repeat=False,\u00a0pin_factory=None)[source] It has two buttons:\u00a0 Left is Pull Up.\u00a0 Right is Pull Down.\u00a0 \u00a0How do you tell the difference?\u00a0 \u00a0Well, Pull up has ground on the button and GPIO18 is where the power is provided from.\u00a0 \u00a0The Right Button, has 3.3V going into the button and Pull-down [&hellip;]","og_url":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/","article_modified_time":"2024-03-03T23:40:59+00:00","og_image":[{"url":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:300\/h:170\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/","url":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/","name":"Pi_Button: Pull-Up and Pull-Down -","isPartOf":{"@id":"https:\/\/mc.scsiraidguru.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/#primaryimage"},"image":{"@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/#primaryimage"},"thumbnailUrl":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:300\/h:170\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg","datePublished":"2021-10-22T17:57:24+00:00","dateModified":"2024-03-03T23:40:59+00:00","breadcrumb":{"@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/#primaryimage","url":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg","contentUrl":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/10\/button.jpg","width":1486,"height":843},{"@type":"BreadcrumbList","@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/button-pull-up-and-pull-down\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mc.scsiraidguru.com\/"},{"@type":"ListItem","position":2,"name":"Raspberry Pi","item":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/"},{"@type":"ListItem","position":3,"name":"Pi_Button: Pull-Up and Pull-Down"}]},{"@type":"WebSite","@id":"https:\/\/mc.scsiraidguru.com\/#website","url":"https:\/\/mc.scsiraidguru.com\/","name":"SCSIraidGURU MC World","description":"","publisher":{"@id":"https:\/\/mc.scsiraidguru.com\/#\/schema\/person\/f21e3238456a7c2adea5944cb376cddc"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mc.scsiraidguru.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/mc.scsiraidguru.com\/#\/schema\/person\/f21e3238456a7c2adea5944cb376cddc","name":"Michael McKenney","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/09\/20210925_105558.jpg","url":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/09\/20210925_105558.jpg","contentUrl":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/09\/20210925_105558.jpg","width":2560,"height":1440,"caption":"Michael McKenney"},"logo":{"@id":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/09\/20210925_105558.jpg"},"sameAs":["http:\/\/mc.scsiraidguru.com"]}]}},"_links":{"self":[{"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages\/2590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/comments?post=2590"}],"version-history":[{"count":78,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages\/2590\/revisions"}],"predecessor-version":[{"id":7677,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages\/2590\/revisions\/7677"}],"up":[{"embeddable":true,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages\/85"}],"wp:attachment":[{"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/media?parent=2590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}