RGBDuino Manual V1.1
RGBDuino Manual V1.1
RGBDuino Manual V1.1
CONTENTS
INTRODUCTION
IntronductiontoComponents
-RGBDuino Uno
- RGBDuino Uno Board
Setting up
-Dowload Arduino IDE
-Install RGBDuino UNO Drivers
-Install RGBDuino UNO libray
LESSONS
1. The
1. The led
led (Digital
(Digital OUTPUT)
OUTPUT)
2. LED
2. LED Blinking
Blinking
3. LED
3. LED OutPut
OutPut (PWM)
(PWM)
4. Push
4. Push Button
Button as Digital Input
5. Serial
5. Melody Dance
Write
6. Serial
6. RGB Blink
Read
7. Tone
7. Controlling
MelodyMotor
8. Potentiometer as Analog Input
9. LDR as Analog Input
10. Controlling Motor
PROJECTS
Interactive
2
www.RGBDuino.cn
INTRODUCTION
3
RGBDuino UNO
RGBDuino UNO compatible board designed and developed specially for
students to learn coding and microcontroller. We named it RGBDuino UNO to
encourage everyone to be a maker by getting started with this amazing board.
UNO Features:
-SMD ATmega328P microcontroller (the same microcontroller on Arduino
UNO)
- Input voltage: USB 5V, from computer,
power bank or standard USB adapter.
- 500mA (maximum) 3.3V voltage regulator.
- 0-5V outputs with 3.3V compatible inputs.
- 14 Digital I/O Pins (6 PWM outputs).
- 6 Analog Inputs.
- ISP 6-pin Header.
- 32k Flash Memory.
- 16MHz Clock Speed.
-10 blue LEDs and two RGB programmable lamps
-MICRO USB power and Programming port
-Buzzer that can play music
-More secure plug-in-free design
- On board programmable push button
- Use Micro-usb socket.
- Cute little yellow duck pattern!
4
Micro USB Connector
Main supply for RGBDuino Uno,Used for program
and debug purpose too.
Reset Button
Button to restart RGBDuino Uno program.
Programmable Button
This button is connected to Pin 2 and GND. To use
it ,user need to configure it as INPUT_PULLUP
PWM Pin ~
The digital pin that has this symbol can only use
analogWrite(); to control the output.
Digital Pin
This pin can be used with :digitalRead();as an input
digitalWrite();as an output.
Piezo Buzzer
Piezo buzzer is connected to Pin 8
through slide switch.
RGB lamp
Two RGB lamp is connected
to Pin12 and Pin13,
There is programmable lamps
Power Pin
GND-Ground Pins
5V-Regulated 5V output
3V3-Regualted 3.3v supply
Analog Pin
This pin can be used with
analogRead(); to read an input in
analog form (0~1023)
5
DOWLOAD Aruino IDE
RGBDuino UNO requires Arduino software to run. You can download the
software from Arduino website (http://arduino.cc/en/Main/Software) and it is
free to use.www.arduino.cc
Arduino IDE is compatible with Windows, Mac OS X and also Linux. You just
need to choose the appropriate operating system installation package for your
computer. If you are a Windows user, it is recommended that you choose
Windows (installer).
Choose the installer that compatible with your laptop OS and download the
6
Arduino IDE.
You will have arduino-1.8.x-windows.exe software after finish downloading for
Windows OS user while for Mac OS user, you will get a zip file of arduino-
1.8.x-macosx zip file as shown below :
7
Label Description Label Description
A Menu Bar E Code Area
B Button Bar F Status Bar
C Serial Monitor G IDE Output
D Sketch Name H Board Name and COM
Number
8
Compiles and approves your code. It will
detect errors in syntax (e.g. missing semi
Verify colon or parentheses).
New
This button opens up a new code window
tab.
Sketch
Serial
This saves the currently active sketch.
Monitor
9
Installing RGBDuino UNO driver
Download RGBDuino UNO driver at RGBDuino Uno product page (under
Attachment tab).
10
Select Board :
11
Install NeoPixelmaster library
12
LESSON 1 :
THE LED (DIGITAL OUTPUT)
13
LESSON 1 :
LIGHT UP THE LED (IDE) i
LED is a light emitting diode. It will light up when a
proper voltage is applied in correct direction.
1
2 Open new sketch on Arduino IDE.
2
Write this code to your sketch:
void setup()
{ // put your setup code here, to run once:
pinMode(7, OUTPUT);
}
void loop()
{ // put your main code here, to run
repeatedly:
digitalWrite(7, HIGH);
}
14
3 Compile the file.
3 4
4
Upload the sketch.
15
LESSON 2:
LED (BLINKING)
16
LESSON 2 :
LIGHT UP THE LED (IDE) i
LED will blink when delay is applied between ON
and OFF. Then it will blinking!
1
2 Open new sketch on Arduino IDE.
2
Write this code to your sketch :
void setup()
{
pinMode(7, OUTPUT);
}
void loop()
{
digitalWrite(7, HIGH);
delay(1000);
digitalWrite(7, LOW);
delay(1000);
}
17
3 4 3 Compile the file.
4
Upload the sketch.
18
LESSON 3:
FADE AN LED
19
LESSON 3 :
FADE AN LED i The LED will fade using analogWrite() function using
Pulse Width Modulation (PWM) which make a digital
output acting as analog output.
2
1
Open new sketch on Arduino IDE.
20
3 4 3 Compile the file.
4
Upload the sketch.
21
LESSON 4:
PUSH BTTON (DIGITAL INPUT)
22
LESSON 4 :
PUSH BUTTON i Push button act as a digital input device. Maker UNO
is able to sense 2 states for digital input, i.e. HIGH
and LOW. Push the button and the LED will turn ON!
1
2 Open new sketch on Arduino IDE.
2
Write this code to your sketch :
int LED = 4;
int Button = 2;
void setup()
{
pinMode(4, OUTPUT);
pinMode(2, INPUT_PULLUP);
}
void loop()
{
if (digitalRead(Button) == LOW)
digitalWrite(LED, HIGH);
else if (digitalRead(Button) == HIGH)
digitalWrite(LED, LOW);
}
23
3 4 3 Compile the file.
4
Upload the sketch.
24
LESSON 5:
MELODY DANCE
25
LESSON 5 :
MELODY DANCE
1
Go to File > Examples > RGBDuino > MelodyDance
26
2 3 2 Compile the file.
3
Upload the sketch.
4
You can change the music note based on your
preference and enjoy the music tone.
27
LESSON 6:
RGB BLINK
28
LESSON 6 :
RGB BIINK
1
Go to File > Examples > RGBDuino > RGBBLINK
29
2 3 2 Compile the file.
3
Upload the sketch.
4
You will see two RGB lights changing colors flashing
30
LESSON 7:
CONTROLLING MOTOR
31
LESSON 7 :
SCHEMATIC
32
LESSON 7 :
CONTROLLING MOTOR
1
Open new sketch on Arduino IDE.
2
2 Write this code to your sketch :
void setup()
{
pinMode(6,OUTPUT);
}
void loop()
{
analogWrite(6,255); //same with HIGH
delay(1000);
analogWrite(6,123);
delay(1000);
analogWrite(6,50);
delay(1000);
analogWrite(6, LOW);//same with 0
delay(1000);
}
33
2 3 2 Compile the file.
3
Upload the sketch.
4
The motor will rotate with 4 different speed.
34
www.RGBDuino.com
Email: 35