• ghost_hunter

    > Ghost Hunting device made for my daughter.



    Description

    This ghost hunting device was created using an Adafruit HUZZAH32 – ESP32 Feather board. It employs various sensors and components to detect environmental anomalies, which are interpreted as potential ghostly activity.

    Components

    • Adafruit HUZZAH32 – ESP32 Feather: The microcontroller at the heart of the device.
    • HC-SR04 Ultrasonic Sensor: Detects objects in front of the user. The closer an object gets, the more LEDs light up. If all five LEDs light up with no visible object, it suggests the presence of a ghost.
    • BME280 Environmental Sensor: Monitors temperature, humidity, and pressure. This data is used to modulate other parts of the device.
    • White LEDs: Five LEDs serve as an indicator for object detection based on the ultrasonic sensor.
    • Buzzer: Beeps at varying speeds depending on how much the temperature deviates from the initial reading.
    • Analog Gauge: Displays real-time humidity readings.

    Usage

    Humidity Display: The analog gauge provides real-time humidity readings to further indicate environmental shifts.

    Power on the device: Once powered on, the device starts recording environmental data.

    Object Detection: The ultrasonic sensor begins detecting objects. As distance decreases, more LEDs will light up. All five LEDs lighting up without a visible object indicates possible ghost activity.

    Temperature Monitoring: The buzzer reacts to temperature changes. As the temperature increases, the beep rate accelerates. The device responds to temperature changes, not the absolute temperature level.

    mPYTHON ghost_hunter.txt

    3D ghost_hunter.stl

  • circuit_fibonacci

    Description

    This CircuitPython script is designed to display a visual Fibonacci sequence-based clock on an Adafruit-compatible display. Using the board, displayio, and RTC libraries, it draws colored rectangles on the screen, which represent Fibonacci numbers. The clock updates its display every minute, with the color of the rectangles changing based on the current time (hours and minutes).

    Display Logic

    • Fibonacci squares of sizes: 1, 1, 2, 3, and 5 are drawn.
    • The squares are positioned to fit on the screen with a 1-pixel border.
    • The clock represents hours and minutes through color-coded squares:
      • Red: Hours (decomposed into Fibonacci numbers).
      • Green: Minutes (in multiples of 5).
      • Blue: If both hours and minutes are represented by the same Fibonacci number.

    Example Output

    Rectangles will be filled based on the current time:

    • 1×1, 1×1, 2×2, 3×3, and 5×5 Fibonacci squares on the screen.
    • These squares will change color every minute to reflect the current time.

    cPYTHON fibonacci.txt

  • ssd1306

    This project allows you to visualize and generate pixel art for the SSD1306 OLED display using MicroPython. Instead of manually calculating the position of individual pixels on a 128×64 display, this tool provides a graphical interface where you can click on pixels to toggle them on or off. After creating your pixel art, the corresponding MicroPython code will be generated for easy copy-pasting into your project.

    ## Features

    Grid-based pixel editor: A 128×64 grid where each cell represents a pixel.

    Pixel toggling: Click on grid cells to toggle pixels on/off.

    Code generation: Generate MicroPython code based on the active pixels in the grid.

    Copy code: Quickly copy the generated code to your clipboard for use in your MicroPython project.

    HTML pixel_draw.html

    mPYTHON ssd1306.txt

  • piano_simulator

    Overview

    This program is a basic piano simulator designed for the Cardputer platform using the MicroHydra framework. It maps keyboard keys to musical notes, which are played through an I2S audio output. The display shows a key layout (white and black keys), and users press keys to generate sine wave-based sounds corresponding to musical notes.

    Features

    • I2S Audio Output: Generates sine wave sounds corresponding to piano notes.
    • Key Mapping: QWERTY keys mapped to white notes and number keys mapped to black (sharp) notes.
    • Display Interface: Displays key layout, showing the mapping of black and white keys.

    Installation

    • Ensure MicroHydra is installed on your Cardputer.
    • Upload the required files, including the userinput, display, and I2S configuration.
    • Run the program to start the piano simulator.

    Controls

    • White Keys (QWERTY): Play notes from C4 to E5.
    • Black Keys (1, 2, 4, 5, 6, 7, 8, 0): Play sharp notes.

    Notes

    • Uses a sine wave generator for audio.
    • Plays notes from C4 to E5, including sharps.
    mHYDRA piano.txt
  • binary_conversion_app

    Overview

    This is a simple binary conversion application designed for the Cardputer platform using the MicroHydra framework. The app allows users to:

    • Convert decimal numbers to binary.
    • Convert binary numbers to decimal.

    The app uses a menu to guide users through selecting the type of conversion, inputting numbers, and viewing the results. The display interface is managed via the display module, user input is handled by the userinput module, and configuration settings are accessed via the config module.

    Features

    • Menu-based interface for choosing conversion type.
    • Binary-to-decimal and decimal-to-binary conversion.
    • User-friendly input with error handling for incorrect formats.

    Key Modules

    • display: Manages output display on the screen.
    • userinput: Captures user keypresses for input.
    • config: Accesses and applies configuration settings like color palettes.

    Installation

    • Install the MicroHydra framework on the Cardputer.
    • Copy the application files (display, userinput, config, and font modules) to the Cardputer.
    • Run the application to start converting numbers between binary and decimal.
    mHYDRA binary_numb.txt
  • percentage_calculator_app

    Overview

    This app is built for the Cardputer platform using the MicroHydra framework. It allows users to perform several percentage-related calculations such as:

    • Find X% of Y – What is X% of a given number?
    • What percentage X is of Y – Calculate what percentage X is of Y.
    • Percentage Change from X to Y – Determine the percentage increase or decrease from X to Y.
    • Determine what number X is Y% of – Find the number for which X is Y%.
    • Percentage Difference between X and Y – Calculate the percentage difference between two numbers.

    The display interface is handled using the display module, user input is captured through the userinput module, and the configuration is accessed via the config module.

    Features

    • User-friendly input for performing common percentage calculations.
    • Text wrapping to display results on small screens.
    • Modular design leveraging MicroHydra libraries.

    Modules

    • display: Handles output rendering.
    • userinput: Captures user interactions.
    • config: Manages configuration settings.
    mHYDRA cal_percentage.txt
  • note-taking_app

    Overview

    This is a basic note-taking application designed for the Cardputer platform using the MicroHydra framework. It allows users to write and save notes to an SD card and view previously saved notes. The app provides an intuitive interface for managing notes, with text display managed via the display module, user input handled through the userinput module, and note storage via the sdcard module.

    Features

    • Write Notes: Users can type and save new notes to an SD card.
    • Read Notes: View previously saved notes with scrolling functionality.
    • SD Card Integration: Notes are stored in a file on the SD card.

    Installation

    • Ensure MicroHydra is installed on your Cardputer.
    • Upload the required modules: display, userinput, sdcard, and the appropriate font.
    • Mount an SD card and run the application.

    Controls

    Escape (ESC): Exit reading mode.

    Write a new note.

    Read saved notes.

    Arrow Keys (UP/DOWN): Scroll through notes.

    Enter (ENT): Save the current note.

    mHYDRA note_app.txt
  • moisture_sensor

    Micropython script made for an ESP32 that monitors moisture levels in soil using an analog sensor connected to pin 34, and controls three LEDs based on the moisture readings. Also added a “loop break” button.

    Set Up

    2x conductive and non corrosive metal nails, one to Ground and the other to pin 34, which is set up as an ADC (Analog-to-Digital Converter) input to read analog values, with a full range of 0-3.3V using atten(ADC.ATTN_11DB).

    Three LEDs are connected to pins 25 (green), 26 (yellow), and 27 (red), and are configured as output pins to be turned on or off.

    A button is connected to pin 13 with an internal pull-up resistor. When pressed, the button’s value goes to 0, which will stop the loop.

    mPYTHON moisture_sensor.txt

  • boogotchi

    This Tamagotchi app is a virtual pet game designed for the Cardputer platform, where the user interacts with a ghost-like creature named “Boo.” It simulates a virtual pet that the user needs to take care of by feeding, playing games, and keeping it happy. Unlike the original Tamagotchi, Boo is a ghost – thus cannot die

    Key Parts

    Blinking Animation: The ghost (Boo) alternates between two images (“ghost” and “ghost_blink”) to simulate blinking.

    Movement: Boo moves around the screen, bouncing off the edges.

    Menu & Stats: The user can press buttons to open the stats screen or the menu (which has options to feed Boo or play a higher/lower game).

    Frame Buffers: It uses framebuf to handle the raw image data of Boo.

    Loading and Saving Stats: Stats are stored in a file (data.txt) and are loaded or saved when necessary.

    mHYDRA main.txt

    mHYDRA stats.txt

    mHYDRA menu.txt

  • binary_wrist_watch

    Binary wrist watch created with ESP32 using Micropython

    mPYTHON boot.txt

    mPYTHON main.txt

    mPYTHON ssd1306.txt