Ks0436 keyestudio Ultimate Starter Kit For Little Inventor (Zero-based Arduino Learning Robot): Difference between revisions
Keyestudio (talk | contribs) |
Keyestudio (talk | contribs) |
||
Line 149: | Line 149: | ||
'''What You Need:''' <br> | '''What You Need:''' <br> | ||
* UNO Baseplate | * UNO Baseplate | ||
[[File:Ks0436- | [[File:Ks0436-14.png|250px]] | ||
* Red LED x 1 | * Red LED x 1 | ||
[[File:Ks0436- | [[File:Ks0436-13.png|300px]] | ||
* 220Ω Resistor x 1 | * 220Ω Resistor x 1 | ||
[[File:Ks0436- | [[File:Ks0436-15.png|300px]] | ||
* Jumper wires x 2 | * Jumper wires x 2 | ||
[[File:Ks0436- | [[File:Ks0436-16.png|300px]] | ||
* USB cable x 1 | * USB cable x 1 | ||
[[File:Ks0436- | [[File:Ks0436-17.png|300px]] | ||
<br> | <br> |
Revision as of 14:48, 8 July 2019
WELCOME TO THE KIT GUIDE
This is your map for navigating beginning embedded electronics.
This kit contains all the information you will need to build the circuit and robot projects for the keyestudio UNO Board.
When you’re done with this guide, you will have built five great projects and acquired the know-how to create countless more.
Now enough talk — let’s start something!
INTRODUCTION
The UNO Board Platform
The keyestudio UNO Board is your development platform.
The UNO Board is essentially a small, portable computer, also known as a microcontroller.
It is capable of taking inputs (such as the push of a button or a reading from a light sensor) and interpreting that information to control various outputs (like blinking an LED light or spinning an electric motor).
This board is capable of taking the world of electronics and relating it to the physical world in a real and tangible way.
The keyestudio UNO Board is a microcontroller board based on the ATmega328P microprocessor.
It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, 2 ICSP headers and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it via an external DC power jack (DC 7-12V) or via female headers Vin/GND(DC 7-12V) to get started.
The Breadboard Platform
A breadboard is a circuit-building platform that allows you to connect multiple components without using a soldering iron.
This is a half-size transparent breadboard, good for small projects.
It has 2 power rails on both sides, a standard double-strip in the middle with 30 columns and 10 rows - a total of 400 tie in points.
This tiny breadboard also has a self-adhesive on the back, so you can stick it onto an Arduino protoshield or keyestudio chassis.
The Baseplate Assembly
Before you can build circuits, you’ll want to first assemble the breadboard baseplate.
This keyestudio baseplate makes circuit building easier by keeping the UNO Board microcontroller and the breadboard connected without the worry of disconnecting or damaging your circuit.
1)To begin with, collect your parts: the UNO Board, breadboard, screwdriver, keyestudio baseplate and four baseplate screws.
2)Align the UNO board with its spot on the baseplate.
The text on it should face the same direction as the text on the breadboard and the baseplate.
Using four screws, affix the UNO Board to the four stand-off holes found on the baseplate.
3)Peel the adhesive backing off the breadboard.
4)Carefully align the breadboard over its spot on the baseplate. The text on the breadboard should face the same direction as the text on the baseplate. Firmly press the breadboard to the baseplate to adhere it.
Your baseplate is now assembled!
The Arduino IDE
In order to get your UNO Board up and running.
you'll need to download the newest version of the Arduino software from www.arduino.cc (it's free!).
This software, known as the Arduino IDE (Integrated Development Environment), will allow you to program the UNO Board to do exactly what you want. It’s like a word processor for coding.
With an internet-capable computer, open up your favorite browser and type the following URL into the address bar to download the software of any versions:
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x
Open Arduino IDE
Downloaded the software package, unzip the folder package, double click the Arduino icon to open.
The functions of each button on the Toolbar are listed below:
Select Your Board And Serial Port
NOTE: select the Arduino UNO, but if you are not sure which ports should choose. Go to your computer panel, and check the Port out in the Device Manger.
The Parts List
The Kit contains extensive electronic components. Below shows you a part of kit components:
GET STARTED WITH CIRCUIT PROJECTS!
There are 20 circuit projects total. Each project will introduce new concepts and components, which will be described in more detail as you progress through the circuits.
As you work your way through each circuit, you will learn to use new and more complicated parts to accomplish increasingly complex tasks.
The project will set the foundation for the rest and will aid in helping you understand the fundamentals of circuit building and electricity!
Circuit 1: Blinking an LED
About this circuit:
Blinking an LED is the classic starting point for learning how to program embedded electronic components.
In this circuit, you’ll write code that makes an LED blink on and off.
What You Need:
- UNO Baseplate
- Red LED x 1
- 220Ω Resistor x 1
- Jumper wires x 2
- USB cable x 1
Component Introduction:
LIGHT-EMITTING DIODES (LEDS):
They come in different colors, brightnesses and sizes. LEDs have a positive (+) leg and a negative (-) leg, and they will only let electricity flow through them in one direction.
LEDs can also burn out if too much electricity flows through them, so you should always use a resistor to limit the current when you wire an LED into a circuit.
RESISTORS: resist the flow of electricity.
You can use them to protect sensitive components like LEDs. The strength of a resistor (measured in ohms) is marked on the body of the resistor using small colored bands.
Each color stands for a number, which you can look up using a resistor chart.
Wiring Diagram:
Check out the schematics and wiring diagram below to see how everything is connected.
Schematics:
With the 220Ω resistor in place, the LED should be quite bright.
If you swap out the 220Ω resistor for the 1kΩ resistor, then the LED will appear a little dimmer.
At the moment, you have Digital pin 10 going to one leg of the resistor, the other leg of the resistor going to the positive side of the LED and the other side of the LED going to GND.
Upload Code:
- 1)Connect the UNO Board to a USB port on your computer.
- 2)Open the program in the code folder- Circuit 1 LED, or directly copy and paste the code below on the Ardunio IDE.
- 3)Select UPLOAD to program the sketch on the UNO Board.
int ledPin = 10; // define digital pin 10. void setup() { pinMode(ledPin, OUTPUT);// define pin with LED connected as output. } void loop() { digitalWrite(ledPin, HIGH); // set the LED on. delay(1000); // wait for a second. digitalWrite(ledPin, LOW); // set the LED off. delay(1000); // wait for a second }
Code Explanation:
- Single line comments start with // and everything up until the end of that line is considered a comment.
Comments are a great way to leave notes in your code explaining why you wrote it the way you did.
- The first line of code is:
int ledPin = 10; // define digital pin 10
As the comment above it explains, this is giving a name to the pin that the LED is connected to. You can change the connection pin here.
- Next, we have the “setup” and “loop” function
void setup()
Every Arduino sketch must have a 'setup' function, and the place where you might want to add instructions of your own is between the { and the }.
In this case, there is just one command there, which, as the comment states tells the Arduino board that we are going to use the LED pin as an output.
void loop()
It is also mandatory for a sketch to have a “loop” function. Unlike the 'setup' function that only runs once, after a reset, the 'loop' function will, after it has finished running its commands, immediately start again.
- Input Or Output ?:
pinMode(ledPin, OUTPUT)
Before you can use one of the digital pins, you need to tell the UNO Board whether it is an INPUT or OUTPUT.
We use a built-in “function” called pinMode() to make pin 10 a digital output.
Digital Output:
digitalWrite(ledPin, HIGH)
digitalWrite(ledPin, LOW)
When you’re using a pin as an OUTPUT, you can command it to be HIGH (output 5 volts) or LOW (output 0 volts).
- What happens when you change the number in one or both of the delay(1000)
This delay period is in milliseconds, so if you want the LED to blink twice as fast, change the value, try 500 or 2000.
Upload the sketch again and you should see the LED start to blink more quickly or slowly.
After downloading this program, in the experiment, you will see the LED flashing on for one second, then off for one second.
The blinking LED experiment is now completed. Thank you!
Troubleshooting:
- Upload failed?
Make sure you have assembled the circuit correctly and verified and uploaded the code to your board. Check out the Board and Serial Port.