<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pushbutton on BatSTEM Academy</title><link>https://docs.batstem.com/en/tags/pushbutton/</link><description>Recent content in Pushbutton on BatSTEM Academy</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 16 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://docs.batstem.com/en/tags/pushbutton/index.xml" rel="self" type="application/rss+xml"/><item><title>L7: The pushbutton</title><link>https://docs.batstem.com/en/docs/l7-the-pushbutton/</link><pubDate>Wed, 02 Apr 2025 00:00:00 +0000</pubDate><guid>https://docs.batstem.com/en/docs/l7-the-pushbutton/</guid><description>&lt;h1 id="the-pushbutton">The pushbutton&lt;a class="td-heading-self-link" href="#the-pushbutton" aria-label="Heading self-link">&lt;/a>&lt;/h1>
&lt;h2 id="what-you-will-learn-in-this-lesson">What you will learn in this lesson&lt;a class="td-heading-self-link" href="#what-you-will-learn-in-this-lesson" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>In this lesson, we will cover:&lt;/p>
&lt;ul>
&lt;li>What a pushbutton is and how it works.&lt;/li>
&lt;li>The difference between input and output devices.&lt;/li>
&lt;li>Making decisions in our programs: the &amp;ldquo;if&amp;hellip;do&amp;hellip;else&amp;rdquo; block.&lt;/li>
&lt;li>Reading the state of a pushbutton from our program to control an LED.&lt;/li>
&lt;/ul>
&lt;h2 id="prerequisites">Prerequisites&lt;a class="td-heading-self-link" href="#prerequisites" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>To follow this lesson, you should be familiar with the basic LED circuit covered in &lt;a href="../l1-internal-led/">&lt;em>Lesson 1: My first project&lt;/em>&lt;/a>, &lt;a href="../l2-the-led-diode/">&lt;em>Lesson 2: The LED diode&lt;/em>&lt;/a> and &lt;a href="../l3-the-led-diode-2/">&lt;em>Lesson 3: The LED diode (2)&lt;/em>&lt;/a>.&lt;/p></description></item><item><title>L8: The pushbutton (2)</title><link>https://docs.batstem.com/en/docs/l8-the-pushbutton-2/</link><pubDate>Wed, 02 Apr 2025 00:00:00 +0000</pubDate><guid>https://docs.batstem.com/en/docs/l8-the-pushbutton-2/</guid><description>&lt;h1 id="the-pushbutton-2">The pushbutton (2)&lt;a class="td-heading-self-link" href="#the-pushbutton-2" aria-label="Heading self-link">&lt;/a>&lt;/h1>
&lt;h2 id="what-you-will-learn-in-this-lesson">What you will learn in this lesson&lt;a class="td-heading-self-link" href="#what-you-will-learn-in-this-lesson" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>In this lesson, we will cover:&lt;/p>
&lt;ul>
&lt;li>What an interrupt is.&lt;/li>
&lt;li>The difference between polling in the main loop and reacting to an event.&lt;/li>
&lt;li>Making a pushbutton execute blocks when its state changes.&lt;/li>
&lt;li>Using simple interrupts to control an LED.&lt;/li>
&lt;li>Optionally, using variables to count button presses.&lt;/li>
&lt;/ul>
&lt;h2 id="prerequisites">Prerequisites&lt;a class="td-heading-self-link" href="#prerequisites" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>To follow this lesson, you should have completed &lt;a href="../l1-internal-led/">&lt;em>Lesson 1: My first project&lt;/em>&lt;/a>, &lt;a href="../l2-the-led-diode/">&lt;em>Lesson 2: The LED diode&lt;/em>&lt;/a>, &lt;a href="../l3-the-led-diode-2/">&lt;em>Lesson 3: The LED diode (2)&lt;/em>&lt;/a> and &lt;a href="../l7-the-pushbutton/">&lt;em>Lesson 7: The pushbutton&lt;/em>&lt;/a>.&lt;/p></description></item><item><title>P3: Interactive traffic light</title><link>https://docs.batstem.com/en/docs/p3-interactive-traffic-light/</link><pubDate>Thu, 16 Jul 2026 00:00:00 +0000</pubDate><guid>https://docs.batstem.com/en/docs/p3-interactive-traffic-light/</guid><description>&lt;h1 id="interactive-traffic-light">Interactive traffic light&lt;a class="td-heading-self-link" href="#interactive-traffic-light" aria-label="Heading self-link">&lt;/a>&lt;/h1>
&lt;h2 id="what-you-will-review-in-this-project">What you will review in this project&lt;a class="td-heading-self-link" href="#what-you-will-review-in-this-project" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>In this project, we will combine what we have learned in the three previous lessons:&lt;/p>
&lt;ul>
&lt;li>Configuring a pushbutton and reading its state.&lt;/li>
&lt;li>Events and interrupts when pressing and releasing a button.&lt;/li>
&lt;li>Using a timer to execute a periodic task.&lt;/li>
&lt;li>Using variables to remember the current state.&lt;/li>
&lt;/ul>
&lt;h2 id="prerequisites">Prerequisites&lt;a class="td-heading-self-link" href="#prerequisites" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>This project puts into practice the concepts learned in &lt;a href="../l7-the-pushbutton/">&lt;em>L7: The pushbutton&lt;/em>&lt;/a>, &lt;a href="../l8-the-pushbutton-2/">&lt;em>L8: The pushbutton (2)&lt;/em>&lt;/a> and &lt;a href="../l9-the-timer/">&lt;em>L9: The timer&lt;/em>&lt;/a>.&lt;/p></description></item></channel></rss>