KS0503 Keyestudio PRO MICRO 5V 16MHZ Development Board(Black and Eco-friendly): Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[image:0503-1.png|thumb|900px|right|Keyestudio PRO MICRO 5V 16MHZ Development Board ]]
[[image:0503-1.png|thumb|600px|right|Keyestudio PRO MICRO 5V 16MHZ Development Board ]]




Line 52: Line 52:
== Download the Arduino IDE ==
== Download the Arduino IDE ==


When getting this control board, we need to install Arduino IDE<br>
Enter Arduino IDE official website:https://www.arduino.cc/
Enter the website https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x,
Click[[File:0173--1.png|300px|frameless|thumb]]
There is a list of different versions of Arduino IDE.<br>
<br>[[File:Ks0503-=2.png|700px|frameless|thumb]]<br>
You can choose a version you like.<br>
<br>[[File:0173--4.png|700px|frameless|thumb]]<br>
We download 1.5.6 version IDE, click “Windows” to download software directly [[File:0503-3.png|200px|frameless|thumb]] and you don’t need to install it; yet, click “Windows Installer” [[File:0503-4.png|200px|frameless|thumb]],that is, the file needs installing.<br>


You can download 1.8.13 version
In this project, we use 1.8.12 version


== How to Install Arduino IDE ==
<br>[[File:Ks0503-=4.png|700px|frameless|thumb]]<br>
<br>[[File:Ks0503-=5.png|700px|frameless|thumb]]<br>
<br>[[File:0173--8.png|700px|frameless|thumb]]<br>


Double click arduino-1.5.6-r2-windows to start.<br>
Select“I Agree”to accept license agreement.<br>


<br>[[File:0486.3png.png|800px|frameless|thumb]]<br>
=== Installing Driver ===


Select components to install and click“Next”.
Windows 10:<br>
The driver will be automatically installed if you plug control board to your computer. Then the COM port is show below:<br>


<br>[[File:0486-2.png|800px|frameless|thumb]]<br>
<br>[[File:Ks0503-=7.png|700px|frameless|thumb]]<br>


Click “Browse” and select another folder. Click “Install” to start the installation.
You need to install it manually if your computer is other Windows system.<br>
We will take win7 system as example.<br>


<br>[[File:0486-3.png|800px|frameless|thumb]]<br>
1. Place the driver folder on your desktop.<br>
The driver files are shown below:<br>  


Finally, wait for a few minutes to finish.
<br>[[File:Ks0503-=8.png|700px|frameless|thumb]]<br>


<br>[[File:0486-4.png|800px|frameless|thumb]]<br>


<br>[[File:0486-5.png|800px|frameless|thumb]]<br>
2. Connect board to your PC with Micro USB cable, open device manager.


<br>[[File:Ks0503-=9.png|700px|frameless|thumb]]<br>


== Installing Driver ==
3.Right-click it and yellow exclamation mark appears


<br>[[File:Ks0503-=10.png|700px|frameless|thumb]]<br>


After downloading, we need to install it. Right-click [[File:0486-12.png|300px|frameless|thumb]], open file location and find out “drivers” folder,
4. Click“Browse.....manually”


<br>[[Image:ks0248 Step2.jpg|600px|frameless]]<br>
<br>[[File:Ks0503-=11.png|700px|frameless|thumb]]<br>


We take win7 system as example.
When you connect keyestudio PRO MICRO to your computer the first time,
right click“Computer”—>“Properties”—>“Device manager”, you can see“Arduino Micro”.


<br>[[Image:ks0249- driver 1.png|600px|frameless]]<br>
5. Find the“drivers”file,and tap“Next”.


Click “Arduino Leonardo”, select“Update Driver software”.
<br>[[File:Ks0503-=12.png|700px|frameless|thumb]]<br>


<br>[[Image:ks0249- driver 2.png|600px|frameless]]<br>
6.Click“install this driver software anyway”


In this page, click“Browse my computer for driver software”.
<br>[[File:Ks0503-=13.png|700px|frameless|thumb]]<br>


<br>[[Image:ks0249- driver 3.png|600px|frameless]]<br>
7. Then click“Close”and check the serial port.
<br>[[File:Ks0503-=14.png|700px|frameless|thumb]]<br>
<br>[[File:Ks0503-=15.png|700px|frameless|thumb]]<br>


Find the“drivers”file,and tap “Next”.
=== Set Boards Manager ===


<br>[[Image:ks0249- driver 4.png|600px|frameless]]<br>
We need to set board before using it. Firstly we need to add the website of board manager in the


Installation completed; click “Close”.  
Website: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json


<br>[[Image:ks0249- driver 5.png|600px|frameless]]<br>
As shown below:


After driver is installed, go to “Device manager” again. right click “Computer”—>“Properties”—>“Device manager”, you can see device as below figure shows, also the correct Com port.
<br>[[File:Ks0503-=16.png|800px|frameless|thumb]]<br>
<br>[[File:Ks0503-=17.png|800px|frameless|thumb]]<br>


<br>[[File:0503-10.png|800px|frameless|thumb]]<br>
Then restart Arduino IDE.<br>
The board is shown below:<br>
 
<br>[[File:Ks0503-=18.png|800px|frameless|thumb]]<br>
 
Search sparkfun and install the related files.
 
<br>[[File:Ks0503-=19.png|800px|frameless|thumb]]<br>
 
Click “Close” when the installation is finished.
 
<br>[[File:Ks0503-=20.png|800px|frameless|thumb]]<br>
 
Then find out[[File:Ks0503-=22.png|800px|frameless|thumb]]  as follows:
 
<br>[[File:Ks0503-=21.png|800px|frameless|thumb]]<br>
 
=== Arduino IDE Setting ===
 
Click[[Image:0486-12.png|200px|frameless]] icon,open Arduino IDE.
 
<br>[[Image:0085=14.png|700px|frameless]]<br>
 
To avoid the errors when uploading the program to the board, you need to select the correct Arduino board that matches the board connected to your computer.
Then come back to the Arduino software, you should click Tools→Board, select the board. (as shown below)
 
<br>[[Image:Ks0503-=23.png|700px|frameless]]<br>
 
Then select the correct working frequency
 
<br>[[Image:Ks0503-=24.png|700px|frameless]]<br>
 
Then select the correct COM port (you can see the corresponding COM port after the driver is successfully installed).
 
<br>[[Image:Ks0503-=25.png|700px|frameless]]<br>
 
Before uploading the program to the board, let’s demonstrate the function of each symbol in the Arduino IDE toolbar.
 
<br>[[Image:Ks0503-=26.png|700px|frameless]]<br>
 
* A- Used to verify whether there is any compiling mistakes or not.
* B- Used to upload the sketch to your Arduino board.
* C- Used to create shortcut window of a new sketch.
* D- Used to directly open an example sketch.
* E- Used to save the sketch.
* F- Used to send the serial data received from board to the serial monitor.
 
===  Hello World! ===
 
Copy the following code to Arduino IDE.
 
<pre>
int val;
int ledpin=13;
void setup()
{
Serial.begin(9600);
pinMode(ledpin,OUTPUT);
}
void loop()
{
val=Serial.read();
if(val=='R')
{
digitalWrite(ledpin,HIGH);
delay(500);
digitalWrite(ledpin,LOW);
delay(500);
Serial.println("Hello World!");
}
}
</pre>
 
 
Set board and COM port, the corresponding board and COM port are shown on the lower right of IDE.
 
<br>[[Image:Ks0503-=27.png|700px|frameless]]<br>
 
Click [[Image:0486-20.png|50px|frameless]] to start compiling the program, check errors.
 
<br>[[Image:Ks0503-=28.png|700px|frameless]]<br>
 
<br>[[Image:Ks0503-=29.png|700px|frameless]]<br>
 
Click [[Image:0486-23.png|50px|frameless]]to upload the program, upload successfully.
 
<br>[[Image:Ks0503-=30.png|700px|frameless]]<br>
 
<br>[[Image:Ks0503-=31.png|700px|frameless]]<br>
 
 
Tap [[Image:0503-26.png|400px|frameless]]to open serial monitor, set baud rate to 9600, input "R" and click“Send”. Then RX indicator flashes and serial monitor shows "Hello World!", which means "Hello World!" is sent by PRO MICRO development board.
 
<br>[[Image:Ks0503-=32.png|700px|frameless]]<br>
 
== Package List ==
 
* Keyestudio PRO MICRO 5V 16MHZ development board*1
* USB cable *1
* Yellow Pin headers * 2pcs
 
== Resource ==
 
https://fs.keyestudio.com/KS0503

Latest revision as of 09:10, 9 April 2021

Keyestudio PRO MICRO 5V 16MHZ Development Board


Introduction

The processor core of Keyestudio PRO MICRO development board is ATMEGA32U4-MU, fully compatible with ARDUINO.
It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable to get started. 

It has 18 digital input/output pins (of which 5 can be used as PWM output), 9 analog input, a 16 MHz crystal oscillator and a micro USB port.
In addition, its working voltage is 5V and we can supply power via micro USB cable and port RAW GND (DC 7-9V).
It is easy to integrate this Micro in everyday objects to make them interactive.
To facilitate the physical design, the board is not welded with pin headers, so you can solder the pin headers by yourself. And the package includes 2pcs of yellow 1*12 2.54 straight pins and 1m black micro USB cable.


Specification

  • Microcontroller: ATMEGA32U4-MU
  • RAW: DC 7-9V
  • VCC: 5V at 500mA
  • Digital I/O Pins:18 (of which 5 provide PWM output)
  • Analog Input Pins:9
  • Maximum current for chip: 200mA
  • Maximum current per pin: 40mA
  • Recommended current per pin: 20mA
  • 8-bit Atmel AVR
  • Flash Program Memory: 32kB
  • EEPROM: 1kB
  • Internal SRAM 2.5kB
  • ADC:10-bit
  • PWM:8bit


Pin Interfaces


thumb

Specialized Functions of Pins

  • Digital Port:RX(D0), TX(D1), D2-D10, D14-D16 and A0-A3(D18-D21)
  • Analog Port:A0-A3, D4(A6), D6(A7), D8(A8), D9(A9)and D10(A10)
  • PWM Port (Pulse-Width Modulation)::D3、D5、D6、D9、D10
  • External interrupt: D3(interrupt 0), D2(interrupt 1), D0(interrupt 2), D1(interrupt 3) and D7(interrupt 4)
  • Serial Communication Port:RX (D0) ,TX (D1)
  • SPI Communication Port:D14 (MISO), D15 (SCLK) and D16 (MOSI)
  • I2C Communication Port:D2 (SDA) and D3(SCL)
  • RAW:external power DC 7-9V


Download the Arduino IDE

Enter Arduino IDE official website:https://www.arduino.cc/, Clickthumb
thumb

thumb

You can download 1.8.13 version In this project, we use 1.8.12 version


thumb

thumb

thumb


Installing Driver

Windows 10:
The driver will be automatically installed if you plug control board to your computer. Then the COM port is show below:


thumb

You need to install it manually if your computer is other Windows system.
We will take win7 system as example.

1. Place the driver folder on your desktop.
The driver files are shown below:


thumb


2. Connect board to your PC with Micro USB cable, open device manager.


thumb

3.Right-click it and yellow exclamation mark appears


thumb

4. Click“Browse.....manually”


thumb


5. Find the“drivers”file,and tap“Next”.


thumb

6.Click“install this driver software anyway”


thumb

7. Then click“Close”and check the serial port.
thumb

thumb

Set Boards Manager

We need to set board before using it. Firstly we need to add the website of board manager in the

Website: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json

As shown below:


thumb

thumb

Then restart Arduino IDE.
The board is shown below:


thumb

Search sparkfun and install the related files.


thumb

Click “Close” when the installation is finished.


thumb

Then find outthumb as follows:


thumb

Arduino IDE Setting

Click0486-12.png icon,open Arduino IDE.


0085=14.png

To avoid the errors when uploading the program to the board, you need to select the correct Arduino board that matches the board connected to your computer. Then come back to the Arduino software, you should click Tools→Board, select the board. (as shown below)


Ks0503-=23.png

Then select the correct working frequency


Ks0503-=24.png

Then select the correct COM port (you can see the corresponding COM port after the driver is successfully installed).


Ks0503-=25.png

Before uploading the program to the board, let’s demonstrate the function of each symbol in the Arduino IDE toolbar.


Ks0503-=26.png

  • A- Used to verify whether there is any compiling mistakes or not.
  • B- Used to upload the sketch to your Arduino board.
  • C- Used to create shortcut window of a new sketch.
  • D- Used to directly open an example sketch.
  • E- Used to save the sketch.
  • F- Used to send the serial data received from board to the serial monitor.

Hello World!

Copy the following code to Arduino IDE.

int val; 
int ledpin=13; 
void setup()
{
Serial.begin(9600); 
pinMode(ledpin,OUTPUT);
}
void loop()
{
val=Serial.read();
if(val=='R')
{
digitalWrite(ledpin,HIGH);
delay(500);
digitalWrite(ledpin,LOW);
delay(500);
Serial.println("Hello World!");
}
}


Set board and COM port, the corresponding board and COM port are shown on the lower right of IDE.


Ks0503-=27.png

Click 0486-20.png to start compiling the program, check errors.


Ks0503-=28.png


Ks0503-=29.png

Click 0486-23.pngto upload the program, upload successfully.


Ks0503-=30.png


Ks0503-=31.png


Tap 0503-26.pngto open serial monitor, set baud rate to 9600, input "R" and click“Send”. Then RX indicator flashes and serial monitor shows "Hello World!", which means "Hello World!" is sent by PRO MICRO development board.


Ks0503-=32.png

Package List

  • Keyestudio PRO MICRO 5V 16MHZ development board*1
  • USB cable *1
  • Yellow Pin headers * 2pcs

Resource

https://fs.keyestudio.com/KS0503