---
title: "GUEST POST: Red Pitaya Halloween Project"
description: Learn how to build a spooky Halloween project with Red Pitaya using the Grove PIR sensor and the Grove 4mm LED lights.
image: https://www.redpitaya.com/media/uploads/news/GUEST%20POST%20Red%20Pitaya%20Halloween%20Project/Red-Pitaya-Halloween-Project-LED-609x507.jpg
---

[![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) » [Blog](https://content.redpitaya.com/blog/tag/blog), [Academia](https://content.redpitaya.com/blog/tag/academia)  »

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

# GUEST POST: Red Pitaya Halloween Project

- 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/GUEST%20POST%20Red%20Pitaya%20Halloween%20Project/Red-Pitaya-Halloween-Project-LED-609x507.jpg)

First of all, I plugged the Sensor Extension board onto the [Red Pitaya](http://redpitaya.com/). To trigger everything I used the Grove PIR sensor – this is the same sensor I used as a trigger in my Alarm project to keep my brother out of my room, so I knew it would work really well.

I decided to use a plastic pumpkin, because picking bits of pumpkin out of electronics when it’s time to dismantle the project doesn’t sound like fun.

Next was adding lights. I have two Grove sensors that contain LEDs that plug right into the board. First I tried the Grove 3mm Purple LED, but it was way too dim – it would work great as an indicator, but it just wasn’t bright enough to do the job. Next I tried the 4mm Green LED, this was better, but even with the variable resistor on the board turned all the way up, it was still too dim. So I decided to use the Green one, plus add two more Yellow LEDs and a Red one:

![](https://www.redpitaya.com/media/uploads/news/GUEST%20POST%20Red%20Pitaya%20Halloween%20Project/Red-Pitaya-Halloween-Project-LED-609x507.jpg)

I soldered a 100 Ohm resistor to each one – the Red Pitaya pins are 3.3V, there is about a 2V drop across the LEDs, so this puts about 13mA through each LED, making them nice and bright. After the above photo was taken all bare wires were covered with electrical tape to prevent shorts. These wires were inserted into the headers on the Extension Board, in digital pins 6, 7 and 8.

Next was sound, I really wanted this to scare people. We went to a couple of local stores looking for something that made a scary sound, but couldn’t find anything suitable. We did however have a very loud hand held siren that we could use – not ideal, but it will certainly scare people. It works by holding down a button, so to control it from the Red Pitaya we had to do the following:

1. Tape down the button with electrical tape, so the siren is always on.
2. Cut the cable between the battery and the siren.
3. Connected the two cut wires to a Grove relay board.
4. Plug in the Grove Relay Board to the Red Pitaya Extension Board.

That way, when the relay is switched on, the circuit is complete, and the alarm sounds:

![](https://www.redpitaya.com/media/uploads/news/GUEST%20POST%20Red%20Pitaya%20Halloween%20Project/Red-Pitaya-Halloween-Project-Siren-609x434.jpg)

So that is the hardware complete, into the Extension Board I have a PIR Sensor, LED and Relay from Grove, plus 3 additional LEDs:

![](https://www.redpitaya.com/media/uploads/news/GUEST%20POST%20Red%20Pitaya%20Halloween%20Project/Red-Pitaya-Halloween-Project-609x270.jpg)

With the hardware complete, all that is left is the code, which is simple using Red Pitaya’s Visual Programming.

First we set up a loop, and check the PIR sensor every 100 milliseconds.

If the sensor is triggered, we turn on the alarm (relay) and LEDs for 10 seconds. However since I had 4 LEDs, I wanted to try to make a ‘flicker’ effect to make it even scarier. To do that, I split the 10 seconds into 100 intervals, and for each 100 millisecond interval, each LED has a 75% chance of being turned on (based on a random number).

![](https://www.redpitaya.com/media/uploads/news/GUEST%20POST%20Red%20Pitaya%20Halloween%20Project/Red-Pitaya-Visual-Programming-609x408.jpg)

 

 I’m really happy with the way the flicker effect worked out. You can see the project working in the video below:

[https://youtu.be/cdJI0QHbcBI](https://youtu.be/cdJI0QHbcBI)

Can wait to set this outside on Halloween and scare people!

---

#### Red Pitaya makes real engineers!

### 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" : "2024-10-24T09:25:48.671Z",
  "datePublished" : "2020-07-01T12:22:00.000Z",
  "headline" : "GUEST POST: Red Pitaya Halloween Project",
  "image" : [ "https://www.redpitaya.com/media/uploads/news/GUEST%20POST%20Red%20Pitaya%20Halloween%20Project/Red-Pitaya-Halloween-Project-LED-609x507.jpg" ],
  "mainEntityOfPage" : {
    "@id" : "https://content.redpitaya.com/blog/guest-post-red-pitaya-halloween-project",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://content.redpitaya.com/hubfs/Red-pitaya-logo.jpg"
    },
    "name" : "Red Pitaya d.o.o."
  }
}
```