Author: McMahon, Pat

How to Build Pat’s “LED Dice & Button Shield”, for an Arduino Uno R3 Shield”.

Pat McMahon– V1– 27/10/2022

Design Brief – You will Build an “LED Dice & Button Shield”, to piggy back on to an Arduino Uno R3 Microcontroller.

LED Dice & Button Shield

Components List of Build

Digital
Pins

7x 5mm Dice
Coloured LED’s

Blank Uno Shield

40 Male
Header
Pins

LED

3 mm Indicator LED

Analog
Pins

Mini Momentary Push Button Switch

_

+

330 R Resistor

10K Resistor

~50 mm Coloured Hook Up Wire X 7

Below are some of the Production Steps, for the LED Dice & Button Shield. Tick off each box as you complete a task and Document it.

Place the 7 Coloured LED’s in the H pattern and spacing as below on the front of the Shield, ensuring the long positive leg (+) is to the left and the short negative leg is(—) on the right, when viewed from the front.
.

Also place the momentary mini switch and the 3mm Indicator LED, below the H pattern LED’s, as below.

7mm

+

_

5mm

Place a piece of cardboard or masking tape over the components, so you can flip the shield over for soldering, without them falling out.

Flip and Solder the components. Use the full page photo following for clarity of parts and wires.

Page 2

Pat McMahon V1—27/10/2022

Below are the coloured wires, push button switch, indicator LED and Arduino pins connections, when viewed from the back.

Blue—D7

Green—D9

Yellow —D8

Pink—D10

Black —Gnd

Common Negative (—)

Note– This view is from the back.

Note– The 10K resistor is a pull up resistor to stop debounce, when pushing the push button switch, from floating.

Red — +5V

10K

5mm

7mm

White —D6

Indicator
LED

330 R

_

+

Below are the LED Dice Patterns Numbers and the Arduino digitalWrite(——-) Code.
See on Pat’s website patsrobots > A066 > LED Dice & Button Shield > Code, for the full Arduino Code to copy & Paste into your Arduino IDE.

1

2

3

4

5

6

Dice Roll Numbers, as viewed from the front, on pushing the Button Switch.

Arduino IDE (Integrated Development Environment) digitalWrite(————)

D8

D10

D7, D8

D7, D10

D7, D8, D10

D7, D9, D10

Page 3

Pat McMahon– V1– 27/10/2022

Use this larger diagram and the hook up info below, to carefully solder your components.

Note—This view is from the back of the Shield with the components on the other side, marked in orange only for orientation & Soldering purposes.

LED’s

Gnd

D13

D12

D11

D10

D9

D8

D7

D6

D5

D4

D3

D2

D1

D0

Digital
Output
Pins

10K

330 R

Small
LED

5V

A0

A1

A2

A3

A4

A2

Analog
Pins

A5

-Small LED positive to 330R to +5V
-Small LED negative to common Gnd
-White Wire to Pin D6
-Dark Blue Wire to Pin D7
-Yellow Wire to Pin D8
-Green Wire to Pin D9
-Pink Wire to Pin D10
-Dice LED’s —’s to common Gnd
-Switch + to shared +5V

Use the 40 pin header, placing the long legs in the Uno and then snap them to length.

Place the completed Shield on top of the uno & solder the short pins.

Go to patsrobots website
> LED Dice & Button Shield
> A066 > Code
Copy & Paste it in to the Arduino IDE, Upload & Test.
CONGRATULATIONS!