My ideas for the project:
Rough Ideas 1:
1.Making a dashboard
2.Making an AC control
3.Making a burglar alarm
4.Making a siren of fire truck
5.Making an emergency alarm
6.Making a spaceship
7.Making an intersection controller
8.Making a robot
9.Making a car
10.Making a distance alarm sensor
Rough Ideas 2:
1.Making a chief guard siren
2.Making an alarm for waking up
3.Making a frequency meter
4.Making a fancy light controller
5.Making a phone control light
6.Making a heartbeat sensor
7.Making a weather monitoring
8.Making an arduino piano
9.Making an arduino college bell
10.Making a toggle switch
**In this complete cycle 2, I have done:**
Dot Matrix, LCD Display, Button Pressing Waves, Potentiometer Waves, Dominoes Lights and Flowing Lights of Perfboard, Servo Motor, Stepper Motor and DC Motor.
**Code for Dot Matrix:**
// Mario's Ideas
// Testing all 64 leds in 8x8 LED matrix by lighting them up one by one
// Raws
#define R1 2
#define R2 3
#define R3 4
#define R4 5
#define R5 6
#define R6 7
#define R7 8
#define R8 9
//Columns
#define C1 10
#define C2 11
#define C3 12
#define C4 13
#define C5 A5
#define C6 A4
#define C7 A3
#define C8 A2
void setup() {
pinMode(R1, OUTPUT);
pinMode(R2, OUTPUT);
pinMode(R3, OUTPUT);
pinMode(R4, OUTPUT);
pinMode(R5, OUTPUT);
pinMode(R6, OUTPUT);
pinMode(R7, OUTPUT);
pinMode(R8, OUTPUT);
pinMode(C1, OUTPUT);
pinMode(C2, OUTPUT);
pinMode(C3, OUTPUT);
pinMode(C4, OUTPUT);
pinMode(C5, OUTPUT);
pinMode(C6, OUTPUT);
pinMode(C7, OUTPUT);
pinMode(C8, OUTPUT);
// Turning all the LEDs off at the start of the sketch
digitalWrite(R1,HIGH);
digitalWrite(R2,HIGH);
digitalWrite(R3,HIGH);
digitalWrite(R4,HIGH);
digitalWrite(R5,HIGH);
digitalWrite(R6,HIGH);
digitalWrite(R7,HIGH);
digitalWrite(R8,HIGH);
digitalWrite(C1,LOW);
digitalWrite(C2,LOW);
digitalWrite(C3,LOW);
digitalWrite(C4,LOW);
digitalWrite(C5,LOW);
digitalWrite(C6,LOW);
digitalWrite(C7,LOW);
digitalWrite(C8,LOW);
}
void SelectRow(int row){
if (row==1) digitalWrite(R1,LOW); else digitalWrite(R1,HIGH);
if (row==2) digitalWrite(R2,LOW); else digitalWrite(R2,HIGH);
if (row==3) digitalWrite(R3,LOW); else digitalWrite(R3,HIGH);
if (row==4) digitalWrite(R4,LOW); else digitalWrite(R4,HIGH);
if (row==5) digitalWrite(R5,LOW); else digitalWrite(R5,HIGH);
if (row==6) digitalWrite(R6,LOW); else digitalWrite(R6,HIGH);
if (row==7) digitalWrite(R7,LOW); else digitalWrite(R7,HIGH);
if (row==8) digitalWrite(R8,LOW); else digitalWrite(R8,HIGH);
}
void SelectColumn(int column){
if (column==1) digitalWrite(C1,HIGH); else digitalWrite(C1,LOW);
if (column==2) digitalWrite(C2,HIGH); else digitalWrite(C2,LOW);
if (column==3) digitalWrite(C3,HIGH); else digitalWrite(C3,LOW);
if (column==4) digitalWrite(C4,HIGH); else digitalWrite(C4,LOW);
if (column==5) digitalWrite(C5,HIGH); else digitalWrite(C5,LOW);
if (column==6) digitalWrite(C6,HIGH); else digitalWrite(C6,LOW);
if (column==7) digitalWrite(C7,HIGH); else digitalWrite(C7,LOW);
if (column==8) digitalWrite(C8,HIGH); else digitalWrite(C8,LOW);
}
void loop() {
for (int i=1;i<9;i++) {
for (int j=1;j<9;j++){
SelectRow(i);
SelectColumn(j);
delay(100);
}
}
}

// Mario's Ideas
// Scrolling text on 8x8 LED matrix (Multiplexing)
// Raws
#define R1 2
#define R2 3
#define R3 4
#define R4 5
#define R5 6
#define R6 7
#define R7 8
#define R8 9
//Columns
#define C1 10
#define C2 11
#define C3 12
#define C4 13
#define C5 A5
#define C6 A4
#define C7 A3
#define C8 A2
int position=0;
int Marios_ideas [8] [54] ={
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{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8, OUTPUT);
digitalWrite(R1,HIGH);
digitalWrite(R2,HIGH);
digitalWrite(R3,HIGH);
digitalWrite(R4,HIGH);
digitalWrite(R5,HIGH);
digitalWrite(R6,HIGH);
digitalWrite(R7,HIGH);
digitalWrite(R8,HIGH);
digitalWrite(C1,LOW);
digitalWrite(C2,LOW);
digitalWrite(C3,LOW);
digitalWrite(C4,LOW);
digitalWrite(C5,LOW);
digitalWrite(C6,LOW);
digitalWrite(C7,LOW);
digitalWrite(C8,LOW);
}
void SelectRow(int row){
if (row==1) digitalWrite(R1,LOW); else digitalWrite(R1,HIGH);
if (row==2) digitalWrite(R2,LOW); else digitalWrite(R2,HIGH);
if (row==3) digitalWrite(R3,LOW); else digitalWrite(R3,HIGH);
if (row==4) digitalWrite(R4,LOW); else digitalWrite(R4,HIGH);
if (row==5) digitalWrite(R5,LOW); else digitalWrite(R5,HIGH);
if (row==6) digitalWrite(R6,LOW); else digitalWrite(R6,HIGH);
if (row==7) digitalWrite(R7,LOW); else digitalWrite(R7,HIGH);
if (row==8) digitalWrite(R8,LOW); else digitalWrite(R8,HIGH);
}
void Set_LED_in_Active_Row(int column, int state){
if (column==1) digitalWrite(C1,state);
if (column==2) digitalWrite(C2,state);
if (column==3) digitalWrite(C3,state);
if (column==4) digitalWrite(C4,state);
if (column==5) digitalWrite(C5,state);
if (column==6) digitalWrite(C6,state);
if (column==7) digitalWrite(C7,state);
if (column==8) digitalWrite(C8,state);
}
void loop() {
for (int x=0; x<5;x++){
for (int j=0;j<8;j++){
SelectRow(j+1);
for (int i=0;i<8;i++){
Set_LED_in_Active_Row(i+1,Marios_ideas[j][(i+position)-abs((i+position)/54)*54]);
}
delay(2);
}
}
position=position+1;
}

// Mario's ideas
// Displaying cat image on 8x8 LED Matrix (Multiplexing)
// Raws
#define R1 2
#define R2 3
#define R3 4
#define R4 5
#define R5 6
#define R6 7
#define R7 8
#define R8 9
//Columns
#define C1 10
#define C2 11
#define C3 12
#define C4 13
#define C5 A5
#define C6 A4
#define C7 A3
#define C8 A2
int pause=300;
int Cat [8] [8] ={
{1,0,0,0,1,0,0,0},
{1,1,1,1,1,0,0,0},
{1,0,1,0,1,0,0,0},
{0,1,1,1,0,0,0,1},
{0,0,1,0,0,0,0,1},
{0,1,1,1,1,0,0,1},
{0,1,1,1,1,1,0,1},
{1,0,1,1,1,1,1,0},
};
void setup() {
pinMode(R1, OUTPUT);
pinMode(R2, OUTPUT);
pinMode(R3, OUTPUT);
pinMode(R4, OUTPUT);
pinMode(R5, OUTPUT);
pinMode(R6, OUTPUT);
pinMode(R7, OUTPUT);
pinMode(R8, OUTPUT);
pinMode(C1, OUTPUT);
pinMode(C2, OUTPUT);
pinMode(C3, OUTPUT);
pinMode(C4, OUTPUT);
pinMode(C5, OUTPUT);
pinMode(C6, OUTPUT);
pinMode(C7, OUTPUT);
pinMode(C8, OUTPUT);
digitalWrite(R1,HIGH);
digitalWrite(R2,HIGH);
digitalWrite(R3,HIGH);
digitalWrite(R4,HIGH);
digitalWrite(R5,HIGH);
digitalWrite(R6,HIGH);
digitalWrite(R7,HIGH);
digitalWrite(R8,HIGH);
digitalWrite(C1,LOW);
digitalWrite(C2,LOW);
digitalWrite(C3,LOW);
digitalWrite(C4,LOW);
digitalWrite(C5,LOW);
digitalWrite(C6,LOW);
digitalWrite(C7,LOW);
digitalWrite(C8,LOW);
}
void SelectRow(int row){
if (row==1) digitalWrite(R1,LOW); else digitalWrite(R1,HIGH);
if (row==2) digitalWrite(R2,LOW); else digitalWrite(R2,HIGH);
if (row==3) digitalWrite(R3,LOW); else digitalWrite(R3,HIGH);
if (row==4) digitalWrite(R4,LOW); else digitalWrite(R4,HIGH);
if (row==5) digitalWrite(R5,LOW); else digitalWrite(R5,HIGH);
if (row==6) digitalWrite(R6,LOW); else digitalWrite(R6,HIGH);
if (row==7) digitalWrite(R7,LOW); else digitalWrite(R7,HIGH);
if (row==8) digitalWrite(R8,LOW); else digitalWrite(R8,HIGH);
}
void Set_LED_in_Active_Row(int column, int state){
if (column==1) digitalWrite(C1,state);
if (column==2) digitalWrite(C2,state);
if (column==3) digitalWrite(C3,state);
if (column==4) digitalWrite(C4,state);
if (column==5) digitalWrite(C5,state);
if (column==6) digitalWrite(C6,state);
if (column==7) digitalWrite(C7,state);
if (column==8) digitalWrite(C8,state);
}
void loop() {
for (int j=0;j<8;j++){
SelectRow(j+1);
for (int i=0;i<8;i++){
Set_LED_in_Active_Row(i+1 ,Cat[j][i]);
}
delay(2+pause);
}
if(pause!=0 and pause>100)pause=pause-100;
if(pause!=0 and pause<=100)pause=pause-10;
}

**Code for LCD Display Temp:**
/*
LiquidCrystal Library - Hello World
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe
modified 7 Nov 2016
by Arturo Guadalupi
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld
*/
// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 7, en = 8, d4 = 9, d5 = 10, d6 = 11, d7 = 12;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
Serial.begin(9600); // Initialize the serial port, set the baud rate into 9600
Serial.println("UNO is ready!"); // Print the string "UNO is ready!"
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Current Temp C:");
}
void loop() {
// Convert analog value of A0 port into digital value
int adcVal = analogRead(A0);
// Calculate voltage
float v = adcVal * 5.0 / 1024;
// Calculate resistance value of thermistor
float Rt = 10 * v / (5 - v);
// Calculate temperature (Kelvin)
float tempK = 1 / (log(Rt / 10) / 3950 + 1 / (273.15 + 25));
// Calculate temperature (Celsius)
float tempC = tempK - 273.15;
// Send the result to computer through serial port
Serial.print("Current temperature is: ");
Serial.print(tempK);
Serial.print(" K, ");
Serial.print(tempC);
Serial.println(" C");
delay(500);
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(tempC);
}

**Code for Button Waves:**
/***********************************************************
File name: 21_button_Processing.ino
Description: Arduino and processing interactive
Button controls Snake Game
Website: www.quadstore.in
***********************************************************/
int btnLPin = 2;//Define digital 2 pin connect the left button
int btnRPin = 3;//Define digital 3 pin connect the left button
int Lval = 0;
int Rval = 0;
void setup() {
// Start the serial port, baud rate to 9600
Serial.begin(9600);
pinMode(btnLPin,INPUT_PULLUP);//Set btnLPin input and pull up module
pinMode(btnRPin,INPUT_PULLUP);//Set btnRPin input and pull up module
}
void loop() {
// Read the button information
int Lval = digitalRead(btnLPin);
int Rval = digitalRead(btnRPin);
Serial.print(Lval);//Send Lval
Serial.print(',');
Serial.print(Rval);//Send Rval
Serial.println(',');
delay(100); //Delay 100ms
}
**Code for Potentiometer Waves:**
/***********************************************************
File name: 20_Potentiometer_Processing.ino
Description: Arduino and processing interactive
The size of the potentiometer voltage control red circle on the PC
Website: www.quadstore.in
***********************************************************/
int potPin = 0; // define UNO board A0 pin connect the potentiometer
void setup() {
// Start the serial port, baud rate to 9600
Serial.begin(9600);
}
void loop() {
// Read the potentiometer voltage
int sensorValue = analogRead(potPin);
//Because the processing 'serial.read()' only support the value between 0-255,
//so you need to put a scale of 0-1023 numerical scale between 0-255
int Voltage = map(sensorValue,0,1023,0,255);
//Serial.write(Voltage);
Serial.print(sensorValue);
Serial.print(" ");
Serial.println(Voltage);
delay(100);
}
**Code for Dominoes Lights:**
int ledpin1=2;
int ledpin2=3;
int ledpin3=4;
int ledpin4=5;
int ledpin5=6;
int ledpin6=7;
int convertValue;
void setup() {
// put your setup code here, to run once:
pinMode(ledpin1, OUTPUT);
pinMode(ledpin2, OUTPUT);
pinMode(ledpin3, OUTPUT);
pinMode(ledpin4, OUTPUT);
pinMode(ledpin5, OUTPUT);
pinMode(ledpin6, OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
for (int i=2; i<8; i++){
convertValue = analogRead(A0);
digitalWrite(i, HIGH);
delay(convertValue);
digitalWrite(i, LOW);
delay(convertValue);
Serial.println(convertValue);
}
}

**Code for Servo Motor:**
//include the servo library
#include<Servo.h>
//create a servo object called servo1
Servo servo1;
int pos = 0; // variable to store the servo position
void setup() {
// put your setup code here, to run once:
// set the servo pin, pin 9, as a servo output pin
servo1.attach(9);
}
void loop() {
// put your main code here, to run repeatedly:
//Read the light value from photoresistor
int lightValue = analogRead(A0);
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
servo1.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
servo1.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
// map the light readings to the angle possible by the servo motor
lightValue = map (lightValue, 0, 500, 0, 180);
// control the servo motor based on the light value read, adjust linearly by angles
servo1.write (lightValue);
}

**Code for Stepper Motor:**
/***********************************************************
File name: 13_steppermotor.ino
Description: You can observe the stepper motor is fast and
forward in a circle, next the stepper motor is
slow and reverse in a circle.
Website: www.quadstore.in
***********************************************************/
int Pin0 = 8;//definition digital 8 pins as pin to control the IN1 (ULN24L01)
int Pin1 = 9;//definition digital 9 pins as pin to control the IN2 (ULN24L01)
int Pin2 = 10;//definition digital 10 pins as pin to control the IN3 (ULN24L01)
int Pin3 = 11;//definition digital 11 pins as pin to control the IN4 (ULN24L01)
int _step = 512;
int _speed = 1;
void setup()
{
pinMode(Pin0, OUTPUT);//Set digital 8 port mode, the OUTPUT for the output
pinMode(Pin1, OUTPUT);//Set digital 9 port mode, the OUTPUT for the output
pinMode(Pin2, OUTPUT);//Set digital 10 port mode, the OUTPUT for the output
pinMode(Pin3, OUTPUT);//Set digital 11 port mode, the OUTPUT for the output
}
void loop()
{
Speed(15);//Stepper motor speed = 15 fast (note:speed from 1 to 15)
Step(512);//Stepper motor forward 512 steps ---- 360 angle
delay(2000);// delay 2S
Speed(1); //Stepper motor speed = 1 slow (note:speed from 1 to 15)
Step(-512);//Stepper motor backward 512 steps ---- 360 angle
delay(2000);//delay 2S
}
void Speed(int stepperspeed)//set Stepper speed
{
speed = 15 - stepperspeed;
if( speed<1){
speed = 1;
}
if( speed>15){
speed = 15;
}
}
void Step(int step)//Stepper motor rotation
{
if(step>=0){ // Stepper motor forward
for(int i=0;i<step;i++){
setStep(1, 0, 0, 1);
delay(speed);
setStep(1, 0, 0, 0);
delay(speed);
setStep(1, 1, 0, 0);
delay(speed);
setStep(0, 1, 0, 0);
delay(speed);
setStep(0, 1, 1, 0);
delay(speed);
setStep(0, 0, 1, 0);
delay(speed);
setStep(0, 0, 1, 1);
delay(speed);
setStep(0, 0, 0, 1);
delay(speed);
}
}else{ // Stepper motor backward
for(int i=step;i<0;i++){
setStep(0, 0, 0, 1);
delay(speed);
setStep(0, 0, 1, 1);
delay(speed);
setStep(0, 0, 1, 0);
delay(speed);
setStep(0, 1, 1, 0);
delay(speed);
setStep(0, 1, 0, 0);
delay(speed);
setStep(1, 1, 0, 0);
delay(speed);
setStep(1, 0, 0, 0);
delay(speed);
setStep(1, 0, 0, 1);
delay(speed);
}
}
}
void setStep(int a, int b, int c, int d)
{
digitalWrite(Pin0, a);
digitalWrite(Pin1, b);
digitalWrite(Pin2, c);
digitalWrite(Pin3, d);
}
**Image for DC Motor**

----
# LINKS
## connect DC MOTOR
https://learn.adafruit.com/adafruit-arduino-lesson-13-dc-motors/overview