• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

CYB, Geiger counter, and random number generation available as REST over HTTP,, preferably in MicroPython

Q&A Forum › Category: ESP32 › CYB, Geiger counter, and random number generation available as REST over HTTP,, preferably in MicroPython
0 Vote Up Vote Down
John Seifarth asked 2 weeks ago

Here’s my project:
I have a 15-year-old Geiger counter, which emits an audible click and flashes a red LED every time it detects a radiation event.
here’s a photo: https://cloud.waw.be/nextcloud/s/dcYqLcSk8yBQbn8
and here’s a video in action; https://cloud.waw.be/nextcloud/s/epEfNWGj9iCazwT
I also have a series of CYB with ambient light sensors. Could I use the ambient light detectors (assuming close contact) on the CYB to detect the Geiger counter’s LED, and collect the time intervals between the events? Could I display this on the screen? Can I use these numbers to generate true random numbers in a stream, and serve these random numbers over a REST web interface?

I would greatly prefer a MicroPython solution, even if less efficient. Any comments or ideas?

Question Tags: project, RNG
5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 weeks ago

Hi.
I don’t think the light sensor on the CYD would be a great choice for that. Most CYD boards have known issues with their light sensors. They are not working properly without changing some faulty wiring on the hardware.
 
However, if the ambient light sensors are working fine on your CYD boards, that may work. However, the LED should be quite close to the sensor, especially if you’re using it during the day.
 
All of the other things you’re asking are possible, and there are many ways to achieve them. However, we don’t have any MicroPython tutorials for those specific tasks.
 
We have a getting-started guide for using MicroPython with CYD boards, though, that might be useful for getting started: 

MicroPython: ESP32 Cheap Yellow Display Board – CYD (ESP32-2432S028R)


 
Regards,
Sara

0 Vote Up Vote Down
John Seifarth answered 2 weeks ago

Thanks Sara!
Can you suggest another light sensor, or should I open the Geiger counter and pull a wire (in parallel?) with the LED and plug that into a GPIO on the CYB. If so which one? What about the audio output and a microphone?
I already purchased the “Learn LVGL: Build GUIs for ESP32 Projects” ebook, and I’ll read the guide you’ve mentioned for MicroPython on CYD.

0 Vote Up Vote Down
Sara Santos Staff answered 2 weeks ago

You can use the same light sensor (an LDR), but another one connected to the CYD GPIOs, instead of using the one that is already built-in.
 
For more accurate results, your second option seems better. You can use any of the available GPIOs on the CYD connectors (except GPIO 21 so that it doesn’t interfere with the display). You can find more information here: https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-pinout-esp32-2432s028r/ on the “Extended IO” header.
 
I hope you like the eBook. I just want to let you know that it doesn’t cover MicroPython. It’s for Arduino IDE only.
 
Regards,
Sara

0 Vote Up Vote Down
John Seifarth answered 2 weeks ago

Hi Sarah,
Yes, I know that the “Learn LVGL” is for Arduino IDE, but I’ve also purchased Micropython on esp32 and the Pi Pico books. Hoping you’ll someday do a CYB MicroPython edition, in the meantime I’ll use the link above to get the CYD python-ready.
My huge lack of knowledge is electronic. I’ve verified https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ so I see that GPIO35 is input-only, and 22 and 27 are input-output. GPIO 21 is for the backlight and thus is not available for me. How do I connect the + and – side of the Geiger Counter LED to the GND and one of the GPIOs?

Thanks, John

0 Vote Up Vote Down
Sara Santos Staff answered 2 weeks ago

In each of the extended IO slots, there’s one connector for GND.
For the LED, you can use GPIO 27, for example.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Smart Home with Raspberry Pi, ESP32, and ESP8266 V1.6 September 9, 2025
  • [eBook Updated] Learn LVGL: Build GUIs for ESP32 Projects – Version 1.5 July 7, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.