---
title: Making A buzzer buzz
description: Step-by-step instructions on how to use a Red Pitaya extension board, a sensor, Dashboard Blocks, and an on-screen switch to make a buzzer.
image: https://www.redpitaya.com/media/uploads/news/Making%20A%20buzzer%20buzz/RP_tutorials_visual_programming_1_b-609x316.png
---

[![Red Pitaya](https://content.redpitaya.com/hubfs/raw_assets/public/Red_Pitaya_November_2021/images/redpitaya-logo-des.svg "Red Pitaya")](https://redpitaya.com/)

[![Red Pitaya](https://content.redpitaya.com/hubfs/raw_assets/public/Red_Pitaya_November_2021/images/redpitaya-logo.svg "Red Pitaya")](https://redpitaya.com/)

- Products

    - [STEMlab 125-14 Gen 2](https://redpitaya.com/stemlab-125-14-gen2/)

          - [STEMlab 125-14](https://redpitaya.com/stemlab-125-14/)
          - [SIGNALlab 250-12](https://redpitaya.com/signallab-250-12/)
          - [SDRlab 122-16](https://redpitaya.com/sdrlab-122-16/)
          - [STEMlab TI (Texas Instruments)](https://redpitaya.com/stemlab-ti-texas-instruments/)
          - [Multi-channel Solutions](https://redpitaya.com/multi-channel-solutions/)
          - [Accessories](https://redpitaya.com/accessories/)
- [Applications](https://redpitaya.com/applications/)
- Documentation

    - [Technical Documentation](https://redpitaya.com/documentation/)
    - [Teaching materials](https://redpitaya.com/teaching-materials/)
    - [Student projects](https://redpitaya.com/student-projects/)
    - [User forum](https://forum.redpitaya.com/)
- [About](https://redpitaya.com/about-us/)

    - [History](https://redpitaya.com/history/)

          - [Distributors](https://redpitaya.com/distibutors-red-pitaya/)
- [Blog](https://content.redpitaya.com/blog)

[Shop](https://redpitaya.com/shop/)

- [ACADEMIA](https://redpitaya.com/academia/)
- [RADIO AMATEURS](https://redpitaya.com/radio-amateurs/)

- [Home](https://redpitaya.com/)
- Products

    - [STEMlab 125-10](https://redpitaya.com/stemlab-125-10/)

          - [STEMlab 125-14](https://redpitaya.com/stemlab-125-14/)
          - [SIGNALlab 250-12](https://redpitaya.com/signallab-250-12/)
          - [SDRlab 122-16](https://redpitaya.com/sdrlab-122-16/)
          - [Accessories](https://redpitaya.com/accessories/)
- [Applications](https://redpitaya.com/applications/)
- [Resources](https://redpitaya.com/documentation/)
- [Shop](https://redpitaya.com/shop/)
- [About](https://redpitaya.com/about-us/)
- [Blog](https://content.redpitaya.com/blog)
- [Compare](https://redpitaya.com/compare/)
- [Login / Register](https://redpitaya.com/my-account/)

### Red Pitaya Blog

[Home](https://redpitaya.com) » [Academia](https://content.redpitaya.com/blog/tag/academia)  »

[Academia](https://content.redpitaya.com/blog/tag/academia)

# Making A buzzer buzz

- Posted by ![Red Pitaya Technical Editorial Team](https://content.redpitaya.com/hubfs/Red-pitaya-fav-ikona.png) [Red Pitaya Technical Editorial Team](https://redpitaya.com/Red-Pitaya-Blog-team/) , July 1, 2020

![](https://www.redpitaya.com/media/uploads/news/Making%20A%20buzzer%20buzz/RP_tutorials_visual_programming_1_b-609x316.png)

This example introduces the Extension board, a sensor and Dashboard Blocks. An on screen switch is used to turn a buzzer ‘ON’ and ‘OFF’. Please use the wiring and block diagrams below for guidance.

 

## Step 1

Connect the extension module to Red Pitaya.

Connect the Buzzer to the CN12 connector on the extension module, which is part of a group of connectors providing digital input/output signals.

![](https://www.redpitaya.com/media/uploads/news/Making%20A%20buzzer%20buzz/RP_tutorials_visual_programming_1_b-609x316.png)

## Step 2

To sound the buzzer we need Indicators \> Buzzer \> Set buzzer on pin block. We can set it to ‘HIGH’ (buzzing) or ‘LOW’ (silent). We also have to specify to which data signal the buzzer is connected, in out example this is ‘D0’, the first o f 16 digital IO (input/output) signals.

The Switch block from the Dashboard generates a named signal each time it is toggled, additionally is sends the ‘ON’ and ‘OFF’ status aft er the change. To receive this signal the Signal \> On receive signal \[\] with signal value \[\] Do block is used. The switch and the receiver must use the same signal name. When the switch is toggled the receiver will execute the code inside the block, but first it will set the variable ‘buzz\_state’ to the state of the switch. The Program \> Logic \> if \[\] do \[\] else \[\] block is used to turn ‘HIGH’ the buzzer only if the switch is set to ‘ON’, else the buzzer will be turned to ‘LOW’.

![](https://www.redpitaya.com/media/uploads/news/Making%20A%20buzzer%20buzz/Buzzer_code.png)

An important programming concept introduced in this example is a ‘variable’. Variables are used by programs to memorize numbers, ON/OFF states, text and many other things. When choosing a name for a variable, find something meaningful, so the name will remind you of the variable’s purpose. The same program can be used to control an LED, try to add a Set LED block, so it will shine while the buzzer is silent.

### About the Red Pitaya Team

 The Red Pitaya Technical Editorial Team is a cross-functional group of technical communicators and product specialists. By synthesizing insights from our hardware developers and global research partners, we provide verified, high-value content that bridges the gap between open-source innovation and industrial-grade precision.

 Our mission is to make advanced instrumentation accessible to engineers, researchers, and educators worldwide.

##### Categories

- [academia (47)](https://content.redpitaya.com/blog/tag/academia)

##### Recent Posts

- [![Non-Invasive GERD Detection: Continuous Esophageal Monitoring via Radiofrequency Spectrophotometry](https://content.redpitaya.com/hs-fs/hubfs/blog%20featured%20image%20-%202026-09-17T104035.026.jpg?width=767&name=blog%20featured%20image%20-%202026-09-17T104035.026.jpg)](https://content.redpitaya.com/blog/non-invasive-gerd-detection-radiofrequency-spectrophotometry)
  
  [Non-Invasive GERD Detection: Continuous Esophageal Monitoring via Radiofrequency Spectrophotometry](https://content.redpitaya.com/blog/non-invasive-gerd-detection-radiofrequency-spectrophotometry)
  
   September 29, 2026
- [![How a $500 Open-Source MRI Console Sparked a Global Research Ecosystem](https://content.redpitaya.com/hs-fs/hubfs/blog%20featured%20image%20-%202026-09-17T131400.982-3.jpg?width=767&name=blog%20featured%20image%20-%202026-09-17T131400.982-3.jpg)](https://content.redpitaya.com/blog/open-source-mri-console-ocra-marcos-red-pitaya)
  
  [How a $500 Open-Source MRI Console Sparked a Global Research Ecosystem](https://content.redpitaya.com/blog/open-source-mri-console-ocra-marcos-red-pitaya)
  
   September 22, 2026
- [![Probing the Wire: Red Pitaya & Zephyr RTOS Workshop with EESTEC](https://content.redpitaya.com/hs-fs/hubfs/blog%20featured%20image%20-%202026-09-17T130509.363.jpg?width=767&name=blog%20featured%20image%20-%202026-09-17T130509.363.jpg)](https://content.redpitaya.com/blog/zephyr-rtos-nordic-logic-analyzer-workshop-eestec-ljubljana)
  
  [Probing the Wire: Red Pitaya & Zephyr RTOS Workshop with EESTEC](https://content.redpitaya.com/blog/zephyr-rtos-nordic-logic-analyzer-workshop-eestec-ljubljana)
  
   September 17, 2026

##### Subscribe to our newsletter

![Red Pitaya](https://content.redpitaya.com/hubfs/raw_assets/public/Red_Pitaya_November_2021/images/redpitaya-logo-wh.svg "Red Pitaya")

An open-source solution for hobbyists, professors,  
 radio amateurs and industrial clients.

**Red Pitaya**  
Velika pot 21,  
5250 Solkan  
Slovenia, Europe  
Phone: +386 30 322 719  
Email: [info@redpitaya.com](mailto:info@redpitaya.com)

**Red Pitaya US**  
TX, Dallas - Downtown Republic Center  
325 N. St. Paul Street  
Suite 3100  
Dallas, Texas, 75202  
United States of America  
IMPORTANT: This address does not accept RMAs  
Phone: (888) 637-2706  
Email: [US.office@redpitaya.com](mailto:US.office@redpitaya.com)

- Customer Service 
    - [Customer Support](https://redpitaya.com/customer-support/)
    - [Shipping & Returns](https://redpitaya.com/shipping-returns/)
    - [Contact us](https://redpitaya.com/contact-us/)
    - [Cookie Policy](https://redpitaya.com/cookie-policy/)
- SLO 
    - [O nas](https://redpitaya.com/o-nas/)
    - [Pogoji poslovanja](https://redpitaya.com/pogoji-poslovanja/)
    - [Politika zasebnosti](https://redpitaya.com/politika-zasebnosti/)
    - [Politika piškotkov](https://redpitaya.com/politika-piskotkov/)

##### Follow Us

<https://www.facebook.com/redpitayaspark/> <https://twitter.com/RedPitayaCom> <https://www.youtube.com/c/RedPitayaTV> <https://www.linkedin.com/company/red-pitaya> <https://www.instagram.com/redpitayacom>

#### Subscribe to our newsletter

Get notified about new SW features & updates, news about latest community projects & events and new Red Pitaya products & discounts

[Subscribe](https://go.redpitaya.com/cs/c/?cta_guid=36ccbdc0-0344-49c4-aa91-aa67cf437c09&signature=AAH58kHkxFYTAKU-ILQzHI1jlrdI_co0RA&placement_guid=a24cb732-1dfb-4d0a-8c52-aa6851ce9102&click=556cfaee-eee4-48e4-95e7-c483a4f78883&hsutk=537e15e740555d2fd6a1c1ad931d2b6f&canon=https%3A%2F%2Fredpitaya.com%2Fabout-us%2F&utm_referrer=https%3A%2F%2Fredpitaya.com%2Fcompare%2F&portal_id=7715357&redirect_url=APefjpGj5Dm9poAAzHFGh4S6pJ-2TvNzBdwZZlfbr7toxfw-epFUtzEHOKToHx0i2TYYr39srj9aSERdntJBh8lJqoSXL-pUF2gwhYvOW6IMm28hQVmhYML2AIbbIRrr3YaoyJkZQ0iRxq-uHlFt66i3_8XpQpXT_M2zF9fS7t0f6hlBjGBJ7X_aXDrhBwXcEAqwoWWleG4uxonSGOR-BBp3tpKcySXYELTGHeGn5Yo61r3xrFvqFP5P6BxVwxTi51_ceW9uBzOMvA1rYz4BsIhLSF8n4bhcHqJTvhibH_laJrjDNdEUUrU&__hstc=72355340.537e15e740555d2fd6a1c1ad931d2b6f.1635738083317.1635738083317.1635746314170.2&__hssc=72355340.5.1635746314170&__hsfp=530052575&contentType=standard-page)

**Red Pitaya**  2025 All Rights Reserved.

- [Privacy Policy](https://redpitaya.com/privacy-policy/)
- [Terms of Use](https://redpitaya.com/terms-of-use/)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Red Pitaya Technical Editorial Team",
    "url" : "https://content.redpitaya.com/blog/author/red-pitaya-technical-editorial-team"
  },
  "dateModified" : "2022-01-05T14:54:02.489Z",
  "datePublished" : "2020-07-01T08:55:00.000Z",
  "headline" : "Making A buzzer buzz",
  "image" : [ "https://www.redpitaya.com/media/uploads/news/Making%20A%20buzzer%20buzz/RP_tutorials_visual_programming_1_b-609x316.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://content.redpitaya.com/blog/making-a-buzzer-buzz",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://content.redpitaya.com/hubfs/Red-pitaya-logo.jpg"
    },
    "name" : "Red Pitaya d.o.o."
  }
}
```