Components and supplies
Passive Buzzer
On/off button
Shift Register 74HC595
Resistor 10k ohm
Resistor 1k ohm
Lever arch switch
Resistor 100 ohm
Resistor 2.7k ohm
Momentary button
Diode Led Red 5mm
Diode Led White 5mm
Resistor 3.3k ohm
Arduino Nano R3
Resistor 5.1k ohm
Tools and machines
Soldering Station
Drill
Project description
Code
Blinking Leds with no delay() function
arduino
With just simple mod (%) operator we can take millis() into action and specify if this is the right time ON state, or OFF state.
Control Four Switches non-exclusive with just one analog pin
arduino
Right use of 5 resistors combinantion allow you to detect four switches non-exclusive. Assuming you are using 3 sets of such setting covers up to 12 switches which is more than enough for this project. Each of 3 sets works as below: - we put positive "+" current (5V) to each resistors: 1k ohm, 2.7k ohm, 3.3k ohm and 5.1k ohm. - each resistor is connected to switch (on/off or momentary) - after switches we are merging all 4 lines into resistor 1k ohm - before 1k ohm resistor we take line into analog input - after 1k ohm resistor we put it to the ground (GND) Pressing buttons is changing resistances in this parallel scheme in non-random way so the result can be extraced as 4-bit value.
Play melody on your buzzer
arduino
I have barely used this function here to emulate menu clicks but can be exhanced to give more length to it. The idea is to create array of 2 values : note & duration. The note represents C4-C7 frequnecy, while duration tell us for how long this should sound.
5 Shift registers daisy chained to control 40 Leds.
arduino
By using 5 shift registers 74HC595 we can control 40 outputs with just 3 pins on arduino board. When we will understand the mechanics behind it, it is very simple to reuse with another projects
Play melody on your buzzer
arduino
I have barely used this function here to emulate menu clicks but can be exhanced to give more length to it. The idea is to create array of 2 values : note & duration. The note represents C4-C7 frequnecy, while duration tell us for how long this should sound.
Blinking Leds with no delay() function
arduino
With just simple mod (%) operator we can take millis() into action and specify if this is the right time ON state, or OFF state.
Control Four Switches non-exclusive with just one analog pin
arduino
Right use of 5 resistors combinantion allow you to detect four switches non-exclusive. Assuming you are using 3 sets of such setting covers up to 12 switches which is more than enough for this project. Each of 3 sets works as below: - we put positive "+" current (5V) to each resistors: 1k ohm, 2.7k ohm, 3.3k ohm and 5.1k ohm. - each resistor is connected to switch (on/off or momentary) - after switches we are merging all 4 lines into resistor 1k ohm - before 1k ohm resistor we take line into analog input - after 1k ohm resistor we put it to the ground (GND) Pressing buttons is changing resistances in this parallel scheme in non-random way so the result can be extraced as 4-bit value.
5 Shift registers daisy chained to control 40 Leds.
arduino
By using 5 shift registers 74HC595 we can control 40 outputs with just 3 pins on arduino board. When we will understand the mechanics behind it, it is very simple to reuse with another projects
Downloadable files
Dicer Schematic
Describes used connections
Dicer Schematic
Comments
Only logged in users can leave comments
mbedni
0 Followers
•0 Projects
Table of contents
Intro
3
0