- Επισκόπιση
- Υλικά
- Πλακέτα Δοκιμών
- Εγκατάσταση του Arduino (Windows)
- Εγκατάσταση του Arduino (Mac and Linux)
- Πλακέτες και Θύρες
- Τα μαθήματα
Επισκόπιση
Σε αυτό το μάθημα θα μάθετε πως να εγκαταστήσετε την πλακέτα Arduino στον υπολογιστή σας και πως να την ρυθμίσετε ώστε να είναι έτοιμη για προγραμματισμό στα παρακάτω μαθήματα.
Υλικά
Στα επόμενα μαθήματα θα χρησιμοποιήσετε τα παρακάτω υλικά.
Arduino Uno R3
1USB Lead
1
Half-size Breadboard
1
5mm Red LED
8
Diffused RGB LED
1
270 Ω Resistor (red, purple, brown stripes)
8
470 Ω Resistor (yellow, purple, brown stripes)
1
1 kΩ Resistor (brown, black, red stripes)
1
2.2 kΩ Resistor (red, red, red stripes)
1
10 kΩ Resistor (brown, black, orange stripes)
1
100 µF capacitor
1
74HC595 Shift Register
1
L293D IC
1
Tactile push switch
3
10 kΩ variable resistor (pot)
1
Photocell (Light Dependent Resistor)
1
Piezo sounder
1
LCD Display (16×2 characters)
1
TMP36 temperature sensor
1
Small 6V DC Motor
1
5V Stepper Motor
1
Servo Motor
1
PN2222 Transistor
1
1N4001 diode
1
Πλακέτα Δοκιμών
Σε όλα τα project των μαθημάτων αυτών θα χρησιμοποιείτε την πλακέτα δοκιμών Breadboard ή Solderless Prototyping Board.
Το Breadboard χρησιμοποιείται όταν κάνουμε κατασκευές γιατί είναι εύκολο στην τοποθέτηση εξαρτημάτων χωρίς να χρειάζεται να χρησιμοποιούμαι κολλητήρι. Όλα τα εξαρτήματα μπορούν να κουμπώσουν πάνω στο breadboard, όπως επίσης και τα καλώδια για τις συνδέσεις με την πλακέτα Arduino ή οποιαδήποτε άλλης συσκευής. Τα καλώδια αυτά θα τα συναντήσετε με την ονομασία “Jumper Wires”.
Αν δείτε ένα διάφανο breadboard απο την πίσω πλευρά θα είναι όπως στην εικόνα παρακάτω.
Στη μέση του breadboard θα δείτε μια σειρά απο υποδοχές οι οποίες συνδέονται μεταξύ τους κάθετα με το σιδεράκι (που μπορείτε να διακρίνετε στην εικόνα). Ότι τοποθετήσετε στις οπές απο μπροστά θα ενώνετε με κάθετα με τις υπόλοιπες οπές δίπλα του.
Στις άλλες πλευρές του breadboard αριστερά και δεξιά θα διακρίνετε κάποιες παράλληλες γραμμές όπου είναι συνδεδεμένες κατά μήκος. Συνήθως της γραμμές αυτές θα τις βρείτε με το χρώμα κόκκινο και μπλέ, και συνήθως χρησιμοποιούνται και την γείωση GND (Blue) και το 5V (red).
Παρακάτω βλέπετε ένα παράδειγμα σχεδίου το οποίο θα γνωρίσετε στο 2ο μάθημα.
Το κόκκινο καλώδιο (jumper wire) συνδέεται στην κόκκινη γραμμή του breadboard και στο pin +5V του Arduino. Η μία άκρη της αντίστασης συνδέεται στην κόκκινη γραμμή του breadboard. Η άλλη άκρη της αντίστασης συνδέεται σε μία κάθετη οπή του breadboard.
To λαμπάκι έχει δύο ακροδέκτες, ο ένας πιο μακρύς απο τον άλλο. Συνδέετε τον μακρύ ακροδέκτη στην ίδια κάθετη γραμμή με την αντίσταση και τον κοντό ακροδέκτη στην μπλέ γραμμή του breadboard (GND). Τέλος βλέπετε και ένα μπλέ καλώδιο (jumper wire) να συνδέετε στην μπλέ γραμμή του breadboard και στο pin GND του Arduino. Με αυτή την συνδεσμολογία έχετε πετύχει να τροφοδοτήσετε το led με +5V απο τον Arduino μέσο μιας αντίστασης.
Εγκατάσταση του Arduino (Windows)
Το πρόγραμμα του Arduino είναι διαθέσιμο για λειτουργικά Windows, Mac and Linux. Ο τρόπος εγκατάστασης διαφέρει απο λειτουργικό σε λειτουργικό. Κάποιες παλαιότερες εκδόσεις του προγράμματος δεν απαιτούν εγκατάσταση, απλώς αποσυμπιέζουμε τον φάκελο που κατεβάσαμε και βρίσκουμε μέσα τα αρχεία του προγράμματος τα οποία είναι εκτελέσιμα. Κάποιες πιο καινούργιες εκδόσεις της εφαρμογής απαιτούν εγκατάσταση.
Ένα σημαντικό βήμα που πρέπει να γίνει στην συνέχεια είναι η εγκατάσταση των οδηγών.
Μπορείτε να ξεκινήσετε απο εδώ κατεβάζοντας το πρόγραμμα ακολουθώντας αυτό το Link, κατεβάστε την πιο πρόσφατη έκδοση αλλά προσοχή μην κατεβάσετε έκδοση που είναι ακόμα σε δοκιμαστικό στάδιο (BETA).
Ξεκινήστε να κατεβάζετε το συμπιεσμένο αρχείο για Windows. Το αρχείο είναι συμβατό απο Windows XP έως και Windows 7.
Όταν το κατέβασμα τελειώσει, αποσυμπιέστε το περιεχόμενο του στην επιφάνεια εργασίας πατώντας το δεξί κουμπί στο ποντίκι και την επιλογή “Extract All…”.
Μετά την αποσυμπίεση του αρχείου μπορείτε να το φάκελο σε οποιαδήποτε σημείο αλλά για τώρα αφήστε το στην επιφάνεια εργασίας για να είναι εύκολη η εύρεση του.
Ο φάκελος Arduino που μόλις δημιουργήσατε περιέχει το πρόγραμμα Arduino και όλα τα αρχεία όπως του οδηγούς που είναι απαραίτητοι για να συνδέσετε την πλακέτα της Arduino στον υπολογιστή μέσω USB. Κάποια λειτουργικά όταν συνδέσουμε το USB καλώδιο εγκαθιστούν αυτόματα τους drivers. Παρακάτω υπάρχουν οδηγίες πως μπορείτε να τους εγκαταστήσετε χειροκίνητα.
Plug one end of your USB cable into the Arduino and the other into a USB socket on your computer. The power light on the LED will light up and you may get a ‘Found New Hardware’ message from Windows. Ignore this message and cancel any attempts that Windows makes to try and install drivers automatically for you.
The most reliable method of installing the USB drivers is to use the Device Manager. This is accessed in different ways depending on your version of Windows. In Windows 7, you first have to open the Control Panel, then select the option to view Icons, and you should find the Device Manager in the list.
Under the section ‘Other Devices’ you should see an icon for ‘unknown device’ with a little yellow warning triangle next to it. This is your Arduino.
Right-click on the device and select the top menu option (Update Driver Software…). You will then be prompted to either ‘Search Automatically for updated driver software’ or ‘Browse my computer for driver software’. Select the option to browse and navigate to the arduino-1.0.2-windows\arduino1.0.2\drivers.
Click ‘Next’ and you may get a security warning, if so, allow the software to be installed. Once the software has been installed, you will get a confirmation message.
That’s it, you are now ready for action, so Skip the next section on installation on Mac and Linux and move straight on to ‘Boards and Ports’.
Installing Arduino (Mac and Linux)
The process for installing the Arduino software on the Mac is a lot easier than on the PC. As before, the first step is to download the file. In the case of the Mac, it is a zip file.
You can now find and launch the Arduino software in your Applications folder. As you are going to use it frequently, you may wish to right-click its icon in the dock and set it to Keep In Dock.
There are many different LINUX distributions and the instructions for each distribution are a little different. The Arduino community has done a great job of putting together sets of instructions for each distribution. So follow the link below and select one of the ten or more distributions on offer.
Boards and Ports
You are now ready to start the Arduino Software, so whatever platform you are using, open the Arduino folder and open the Arduino application contained within it.
This will start the Arduino IDE, but before you can get programming, you have to tell the Arduino software which type of Arduino board you are using and also select the port it is connecting to.
To tell the Arduino IDE which type of board you are using. From the ‘Tools’ menu, select Board and then ‘Arduino Uno’ or ‘Leonardo’ as appropriate.
Also on the ‘Tools’ menu, you will find the ‘Serial Port’ option. Select this option.
If you are using Windows, there will probably only be one option here and it will either say COM3 or COM4. Even though there is only one option, you will still need to select it.
If you are using a Mac or Linux, there will be more options there, but it will usually be the top option in the list, as this will be the device most recently plugged in. This is useful, as the name of the port may not look like it has anything to do with Arduino. It will probably be called something like/dev/tty.usbmodemXXXX or /dev/ttyUSBn
In the next lesson, you will start by programming your Arduino board to make its built-in LED blink.
The Lessons
The remainder of the lessons in this series are designed to lead you through various aspects of both electronics and programming the Arduino.
They follow in a logical order, with each lesson building on the lessons that have come before.
- Lesson 1. Blink
- Lesson 2. LEDs
- Lesson 3. RGB LEDs
- Lesson 4. Eight LEDs and a Shift Register
- Lesson 5. The Serial Monitor
- Lesson 6. Digital Inputs
- Lesson 7. Make an RGB LED Fader
- Lesson 8. Analog Inputs
- Lesson 9. Sensing Light
- Lesson 10. Making Sounds
- Lesson 11. LCD Displays – Part 1
- Lesson 12. LCD Displays – Part 2
- Lesson 13. DC Motors
- Lesson 14. Servo Motors
- Lesson 15. DC Motor Reversing
- Lesson 16. Stepper Motors
Leave a Reply