Skip to main content

Intelligent Control Design and Production - Program Reference

This section provides program references for circuit building exercises using the Steamania JoyKit V2. Each project includes:

  • Project Objectives: Clear learning goals
  • Required Hardware: List of electronic modules needed
  • Core Tasks: Key programming challenges
  • Reference Solution: Complete program code with explanations

Available Projects​

Project 1: Indoor Temperature Monitoring System​

Objective: Build a temperature monitoring system using a temperature sensor and full-color LED. The LED color changes with temperature (from green to red as temperature increases).

Required Hardware:

  • Steamania JoyKit V2 (Main Controller)
  • BME280/BMP280 Temperature & Humidity Sensor Module
  • WS2812B Full-Color LED Module

Core Tasks:

  1. Enable temperature sensor module
  2. Continuously read temperature data
  3. Map temperature values to LED colors (green → yellow → red)
  4. Display real-time temperature on screen

Key Concepts:

  • Sensor data acquisition
  • Conditional logic for color mapping
  • RGB color control
  • Loop structures

👉 View Detailed Solution


Project 2: Simulated Indoor Lighting Circuit​

Objective: Simulate a light switch using buttons and a full-color LED.

Required Hardware:

  • Steamania JoyKit V2 (Main Controller)
  • Push Button Module
  • WS2812B Full-Color LED Module

Core Tasks:

  1. Configure button as digital input
  2. Implement toggle logic (press to switch on/off)
  3. Control LED to emit white light when "on"
  4. Display current switch status

Key Concepts:

  • Digital input reading
  • State machine / toggle logic
  • Edge detection (button press vs. hold)
  • Binary state control

👉 View Detailed Solution


Project 3: Simulated Community Street Light System​

Objective: Build an automatic street light system using a light sensor and 4 full-color LEDs (blue light). The system automatically adjusts the number of lit LEDs based on ambient light intensity (darker = more LEDs on) and displays real-time sensor values.

Required Hardware:

  • Steamania JoyKit V2 (Main Controller)
  • TCS34725 Color Sensor (for ambient light detection)
  • 4x WS2812B Full-Color LED Modules (configured as blue street lights)

Core Tasks:

  1. Read ambient light intensity from sensor
  2. Implement multi-level threshold logic
  3. Control 4 LEDs independently based on light level
  4. Display real-time sensor values on screen
  5. Automatically adjust LED count (0-4 LEDs)

Key Concepts:

  • Analog/digital sensor reading
  • Multi-level conditional branching
  • Array-like control of multiple outputs
  • Real-time data visualization
  • Threshold-based automation

👉 View Detailed Solution


Project 4: Digital Calendar​

Objective: Build a digital calendar using buttons and a 4-digit 7-segment display. Initially display "0000", and switch between displaying the year "2026" and the month-day "0131" by pressing a button, cycling continuously.

Required Hardware:

  • Steamania JoyKit V2 (Main Controller)
  • 4-Digit 7-Segment Display Module
  • Push Button Module

Core Tasks:

  1. Initialize 7-segment display to show "0000"
  2. Implement button press detection
  3. Toggle between year display mode (2026) and month-day display mode (0131)
  4. Continuously cycle through display modes

Key Concepts:

  • Multi-digit 7-segment display control
  • State management
  • Button debouncing
  • Display mode switching

👉 View Detailed Solution


Project 5: Voice-Controlled Electronic Candle​

Objective: Design a voice-controlled candle using a sound sensor, full-color LED, and music module. The LED defaults to flashing green light. Blow once to switch to flashing red light (simulating lighting). Blow again to extinguish the LED and play music (at least three notes), then remain extinguished, simulating blowing out the candle. The process cycles.

Required Hardware:

  • Steamania JoyKit V2 (Main Controller)
  • Sound Sensor Module (Microphone)
  • WS2812B Full-Color LED Module
  • Buzzer/Music Module

Core Tasks:

  1. Initialize LED to flash green light (default state)
  2. Detect sound trigger (blowing air)
  3. Switch to red flashing mode on first blow (candle lit)
  4. Detect second blow to extinguish LED and play music
  5. Cycle through all states continuously

Key Concepts:

  • Sound detection and triggering
  • State machine with multiple modes
  • LED flashing patterns
  • Music playback integration

👉 View Detailed Solution


Project 6: Smart Curtain​

Objective: Design a smart curtain system using a motor, driver module, and multiple sensors (buttons, remote control, voice, etc.). Includes three sub-tasks: 1) Button control for forward/reverse rotation for 1 second; 2) Remote control long-press for forward/reverse (stop when released); 3) Voice commands for forward/reverse rotation for 1 second. Encourage implementing multiple tasks with a single program.

Required Hardware:

  • Steamania JoyKit V2 (Main Controller)
  • DC Motor Module
  • Motor Driver Module (L298N or similar)
  • Push Button Module (2 buttons: forward/reverse)
  • IR Remote Control Module
  • Voice Recognition Module (optional)

Core Tasks:

  1. Button control: Press buttons to control forward/reverse rotation for 1 second
  2. Remote control: Long-press remote buttons for forward/reverse (stop when released)
  3. Voice control: Voice commands control forward/reverse rotation for 1 second

Key Concepts:

  • Motor forward/reverse control
  • Multiple input methods integration
  • Human-computer interaction diversity
  • Input priority handling

👉 View Detailed Solution


How to Use These Projects​

For Students:​

  1. Read the project requirements carefully
  2. Plan your circuit connections first
  3. Try to write the program yourself before looking at the solution
  4. Test and debug incrementally
  5. Experiment with modifications (e.g., different color schemes, thresholds)

For Instructors:​

  • Use these as lab exercises or homework assignments
  • Modify parameters to create variations (e.g., different temperature ranges)
  • Combine multiple projects for more complex challenges
  • Encourage students to add creative features

Prerequisites​

Before attempting these projects, students should be familiar with:

  • Basic JoyKit programming (reading/writing registers)
  • Digital I/O configuration
  • Understanding of hexadecimal numbers
  • Basic conditional jump instructions

Next Steps​

Choose a project to start with, or explore them in order of increasing complexity:

  1. Temperature Monitor - Beginner friendly
  2. Light Switch - Intermediate
  3. Street Light System - Advanced