thank you for purchasing our product.
Please nd our instrucons below.
1. General informaons & technical data
Our board is a high quality reproducon and fully compable with the Arduino Mega 2560.
We would, however, like to emphasize that this is not an original Arduino.
The Mega board is the right microcontrollerboard for everyone who wants to quickly join the
programmers world.
This set will lead you to a variety of projects.
Its ATMega2560-Microcontroller oers you enough performance for your ideas and projects. It has a size
of 101.52 mm x 53.3 mm and includes 54 digital in– and outputs and 16 analog inputs.
Model ARD_Mega2560R3
Microcontroller ATmega2560
Input voltage 7-12V
Input current (max.) 6-20V
Digital IO 54 (14 mit PWM)
Analog IO 16
DC current IO 40mA
DC current 3.3V 50mA
Memory 256kB (8kB für Bootloader)
SRAM 8kB
EEPROM 4kB
Clock Speed 16 MHz
Dimensions 101.52mm x 53.3mm
Ausgabe 19.05.2017 Copyright by Joy-IT 3
2. Assignment
Ausgabe 19.05.2017 Copyright by Joy-IT 4
3. Soware installaon
To start programming your JOY-IT ARD_Mega2560R3, you need to install the development environment,
and, of course, the drivers, on your computer.
The Arduino IDE is best for using with the Mega2560.
It is licensed as open source soware under the GPLv2 terms and ist concept and design is aiming for
beginners.
This IDE is completely compable to our Mega2560R3 board and oers you every driver you need for a
quick start.
You can download the soware here.
3.1 Soware setup
Aer installing the soware, you need to choose the right microcontroller-board in the environment.
Therefore you need to be aware of two steps:
1. Choose „Arduino/Genuino Mega or Mega 2560“ at [Tools->Board].
Ausgabe 19.05.2017 Copyright by Joy-IT 5
2. Choose the right port (marked with Arduino/Genuino Mega or Mega 2560) at [Tools -> Port].
Ausgabe 19.05.2017 Copyright by Joy-IT 6
4 EU-Declaraon of conformity
Manufacturer JOY-iT Europe GmbHPascalstr. 847506 Neukirchen-Vluyn
Arcle descripon: ard_mega2560R3 /ARD-Set01
Descripon: Microcontroller-Board / Set
Purpose: experimental setup / prototyping
The manufacturer, the JOY-IT Europe GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn, declares that the
product „ard_Mega2560IP“ is, during operaon according to regulaons, in compliance with the
fundamental requirements of the following guidelines:
2014/ 30/EU (EMV) & 2011/65/EU (Rohs)
The following standards has been applied for assessment:
EN 61326-1: 2013
electrical equipment for measure-, control– and laboratorydevices - EMV requirement part 1 general requirements
Date Name Signature Posion
03.03.2017 Yue Yang Director
Ausgabe 19.05.2017 Copyright by Joy-IT 7
5 Project examples
5.1 Project 1: „Hello World“
We start with an easy one.
You just need the board and an USB cable to start with the „Hello World!“ project.
This is an communicaon test for your Mega2560 and your computer and a basic project for your rst
steps in the Arduino world.
Aer compleng the drivers installaon, let‘s open the Arduino soware and write some code, which
displays „Hello World“ underneath your code.
Of course you can create some code, which is going to repeat the message automacally.
We can instruct the LED on PIN 13 to blink at rst and to output „Hello World“ aerwars.
Hardware Amount
Mega2560 board 1
USB cable 1
LED 1
Ausgabe 19.05.2017 Copyright by Joy-IT 8
int val; // defines variable “Val”
int ledpin=13; // defines digital interface 13
void setup()
{
Serial.begin(9600); // sets baudrate to 9600 to comply
// with software configurationre
pinMode(ledpin,OUTPUT); // sets digital PIN 13 to output. // This configuration is requi//red when using I/O ports.}
void loop(){
val=Serial.read(); // reads symbols and assigns to „Val“
if(val=='R') // checks input for the letter „R“
{ // if so, turn on LED at PIN 13
digitalWrite(ledpin,HIGH);
delay(500);
digitalWrite(ledpin,LOW); // turns off LED
Open the serial monitor and insert a „R“.
The LED is going to light up once and you will see „Hello World“ in the serial monitor.
Ausgabe 19.05.2017 Copyright by Joy-IT 10
5.2 Project 2: ashing LED
The ashing LED project is quite easy.
We already discovered the LED in the previous project.
This me we will connect the LED to a digital port.
Diesmal werden wir eine LED mit einem der digitalen Pins verbinden.
This is what we need:
Hardware Amount
Mega2560 board 1
USB cable 1
Red M5 LED 1
220Ω resistor 1
Breadboard 1
Breadboard cable 2
Just connect the components as seen in the circuit diagram below.
We are going to use digital pin 10.
Connect the LED to a 220 Ohm resistor to avoid damage by higher currents.
Ausgabe 19.05.2017 Copyright by Joy-IT 11
int ledPin = 10; // Defines digital PIN 10.
void setup()
{
pinMode(ledPin, OUTPUT); // Defines PIN with connected LED as // output }
void loop(){
digitalWrite(ledPin, HIGH); // turns on LED
delay(1000); // waits a second
digitalWrite(ledPin, LOW); // turns off LED
delay(1000); // waits a second
}
Nach dem Runterladen dieses Programms, wirst du im Experiment die an Pin 10 verbundene LED sich, mit
einem Intervall von ca. einer Sekunde, Ein- und Ausschalten sehen.
Ausgabe 19.05.2017 Copyright by Joy-IT 12
5.3 Project 3: PWM Lightcontrol
PWM, short for Pulse Width Modulaon, is a technique, used to
translate analog signals into digital signals.
A computer is not able to output an analog voltage.
Er kann nur Digitalspannung ausgeben mit Werten wie 0V oder
5V.
Therefore, a high-resoluon counter is used, to code an analog
signal level, by modulang the occupancy rate of PWM.
The voltage and current is led by repeated pulse sequences to the component.
Every analog value can be decoded by PWM, if the bandwith is appropiated.
The value of the outputvoltage is calculated with the duraon of the on and o condions.
Voltage = (ON duraon / pulse duraon) * maximum voltage
PWM has many uses: control of lighntensity, control of motor speed etc.
Ausgabe 19.05.2017 Copyright by Joy-IT 13
The three basic parameters of PWM:
1. Die amplitude of the pulse width (minimum/maximum)
2. Pulsefrequency
3. Voltage level
The Mega2560 has 6 interfaces, supporng PWM: digital PIN 3, 5, 6, 9, 10 and 11.
Hardware Amount
In a previous project, we used a digital signal to control a
LED.
Mega2560 Plane 1
USB Kabel 1
Rote M5 LED 1
Variabler Widerstand 1
Now we are going to use a potenometer to adjust the
brightness of the LED.
While creang this program, we will make use of the analog wring funcon.
In this experiment, we are going to read the analog value of the potenmeter and assign this value to the
PWM port, to noce a change of LED brightness.
The last part will be to show the analog value on the screen.
Ausgabe 19.05.2017 Copyright by Joy-IT 15
int potpin=0; // inialises analog PIN 0
int ledpin=11; // inialises digital PIN 11 (PWM output)
int val=0; // saves the value of the sensor
void setup()
{pinMode(ledpin,OUTPUT);// sets digital PIN 11 to output Serial.begin(9600);// sets baudrate to 9600
}
void loop()
{
val=analogRead(potpin);// reads analog value and assigns it to „Val“ Serial.println(val);// shows „Val“ value analogWrite(ledpin,val/4);// turns on LED and assigns brightness //(maximum PWM output is 255) delay(10);// waits 0,01 seconds }
Aer transferring the code, we can noce the
value changing by moving the potenometer.
We can also noce the brightness of the LED
changing.
Ausgabe 19.05.2017 Copyright by Joy-IT 16
5.4. Projekt 4: Trac lights
We already discovered the ashing LED project.
Now it is me to do a more complicated experiment:
Trac lights
During this experiment we will used three LEDs with dierecnt
colors.
Hardware Amount
Mega2560 board 1
USB cable 1
Red M5 LED 1
Yellow M5 LED 1
Green M5 LED 1220Ω resistor 3
Breadboard 1
Breadboard cable 4
Ausgabe 19.05.2017 Copyright by Joy-IT 17
Because this is a simulaon of trac lights, the lighng duraon should be as long as real trac lights.
Therefore we are going to use the Arduinos delayfuncon, to control the delay.
Ausgabe 19.05.2017 Copyright by Joy-IT 18
int redled =10; // initialises digital PIN 8
int yellowled =7; // initialises digital PIN 7
int greenled =4; // initialises digital PIN 4
void setup()
{
pinMode(redled, OUTPUT); // sets red LED PIN to output
pinMode(yellowled, OUTPUT); // sets yellow LED PIN to output
pinMode(greenled, OUTPUT); // sets green LED PIN to output
}
void loop()
{
digitalWrite(greenled, HIGH); // turns on green LED
delay(5000); // waits 5 seconds
digitalWrite(greenled, LOW); // turns off green LED
for(int i=0;i<3;i++) // flashes 3x
{
delay(5000); // waits 5 seconds
digitalWrite(yellowled, HIGH); // turns on yellow LED
delay(5000); // waits 5 seconds
digitalWrite(yellowled, LOW); // turns off yellow LED
}
delay(5000); // waits 5 seconds
digitalWrite(redled, HIGH); // turns on red LED
delay(5000); // waits 5 seconds
digitalWrite(redled, LOW); // turns off red LED
}
You can watch the trac lights, aer the transfer is complete.
The green light is going to light up for ve seconds.
The yellow light then ashes three mes.
The green light will then light up for another ve seconds.
Then the yellow light wll ash three mes again.
In the end the red light will light up for three seconds and completes the cycle.
Ausgabe 19.05.2017 Copyright by Joy-IT 19
Loading...
+ 44 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.