This project is from Microcessor Design class at the University of Seoul. Developed with JKit-128-1.
This project is mood light with convenient features such as:
- Light detection: Light is automatically on at night.
- Double clap detection: User can toggle the light with a double clap.
- Sound threshold adjustment: User can adjust the threshold sound value. Every sound bigger than the threshold is checked whether it is a doble clap.
Microprocessor.1.mp4
-
Setup hardware
-
Board: JKit-128-1
-
Paripararls
Component Name Prefix Manufacturer Rotary Encoder P1 SunFounder RGB LED Module P2 SMG Sound Sensor Module (TS0223) P3 SMG
-
-
Install AVR-GCC
We used
avr-gcc-7.3.0-atmel3.6.1-arduino7-i686-w64-mingw32
compiler which can be downloaded from the link below.http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino7-i686-w64-mingw32.zip
-
Install make
We used
make-4.4.1
make program which can be downloaded from the link below.https://github.com/xpack-dev-tools/windows-build-tools-xpack/releases/
-
Build project
mkdir build cd build cmake\ -DAVR_TOOLCHAIN_DIR=${Fill in path to the folder containing AVR-GCC bin folder}\ -DCMAKE_MAKE_PROGRAM=${Fill in path to make.exe}\ ..
-
Upload the executable to your machine using avrdude
┌───────────────────────────────┐
│ System State Machine │ // State machine that drives the entire system
├───────────────────────────────┤
│ Lamp State Machine │ // State machine that manages the on/off state of the mood lamp
├───────────────────────────────┤
│ Clap State Machine │ // State machine that detects two consecutive claps
├───────────────────────────────┤
│ Peripheral Control Programs │ // Code that controls each peripheral device
│ (FND, LED, Timer, etc.) │
├──────────────────────┬────────┤
│ Pin Settings │ System │ // Pin Settings: definitions of pin configuration for each peripheral on the ATmega128
├──────────────────────┤ Config │
│ ATmega128 Lib │ │ // System Config: system-level configuration unrelated to pin settings
└──────────────────────┴────────┘