This explaines how to create it in the breadboard, how to solder it and how to make some changes.
Remove these ads by
Signing UpStep 1: What is Arduino?
Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects can be stand-alone, or they can be communicate with software running on your computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free.
The Arduino programming language is an implementation of Wiring, a similar physical computing platform, which is based on the Processing multimedia programming environment.
Why Arduino?
There are many other microcontrollers and microcontroller platforms available for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar functionality. All of these tools take the messy details of microcontroller programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of working with microcontrollers, but it offers some advantage for teachers, students, and interested amateurs over other systems:
- Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least expensive version of the Arduino module can be assembled by hand, and even the pre-assembled Arduino modules cost less than $50
- Cross-platform - The Arduino software runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows.
- Simple, clear programming environment - The Arduino programming environment is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers, it's conveniently based on the Processing programming environment, so students learning to program in that environment will be familiar with the look and feel of Arduino
- Open source and extensible software- The Arduino software and is published as open source tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. SImilarly, you can add AVR-C code directly into your Arduino programs if you want to.
- Open source and extensible hardware - The Arduino is based on Atmel's ATMEGA8 and ATMEGA168 microcontrollers. The plans for the modules are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it. Even relatively inexperienced users can build the breadboard version of the module in order to understand how it works and save money.
How do I use Arduino?
Step-by-step instructions for setting up the Arduino software and connecting it to an Arduino Duemilanove:












































Visit Our Store »
Go Pro Today »




It' not a really "random" sequence, but i think it will work the same.
If you use that code, remember to change the code in the first lines from:
int pinLeds3 = 8;
int pinLeds4 = 7;
to:
int pinLeds3 = 7;
int pinLeds4 = 8;
int pinLeds3 = 7;
int pinLed4 = 8;
and in this way my dice don't works well, but with
int pinLed4 = 7;
int pinLeds3 = 8;
it works perfectly.
Probably it's my fault but can you check it?
Thanks a lot
P.S. Awesome project
//Led pins
int pinLeds1 = 10;
int pinLeds2 = 9;
int pinLeds3 = 7;
int pinLed4 = 8;
//Button pin
int buttonPin = 6;
int buttonState;
//Ran will be randomized from 1 to 6
long ran;
//Time is the time of delay
int time = 2000;
randomSeed(analogRead(0));
and
ran = random(1, 7);
Much appreciated. By the way this is a fantastic project to learn with.
" randomSeed(analogRead(0)); " is needed for have a correct randomness (without it, the arduino will use the same sequence every time).
" ran = random(1, 7); " set the variable "ran" equal to a number from 1 to 6, that is the result.
Thanks for the great starter project.
http://dl.dropbox.com/u/7992054/arduino/Dice.pde
randomSeed(analogRead(0));
However, this line code is already present in the complete code of the instructables.
It also has the stardard layout of the arduino!
However, you cannot run the sequence of led's disconnecting Arduino, simply because the sequence is done by the Arduino.
If your problem is keep attacking Arduino to your computer, you can connect a 9 volt battery and make Arduino "portable".
If you want to program the sequence without Arduino because it occupies too much space, you can use another microcontroller, like Picaxe or Atmel, which are very small and they can be used in the breadboard.
I built this project today and came across an error in the code. According to the circuit diagram, the pin configuration should be this:
int pinLeds3 = 7;
int pinLed4 = 8;
It's written the other way around in the downloadable pde of this instructable.
Hope this was helpful..!
Perfect!
brilliant!... Im just beging the kind of stuff (thanks to Maplins™, the electronics specialist!)