2012-05-13

Arduino Tutorial: Lesson 0 - Getting prepared - Arduino Hướng dẫn: Bài 0 - Bắt chuẩn bị


Arduino Tutorial: Lesson 0 - Getting prepared - Arduino Hướng dẫn: Bài 0 - Bắt chuẩn bị 

This tutorial is by Limor Fried and from http://www.ladyada.net/learn/arduino


Introduction
This lesson won't teach any electronics, really. Its more for making sure that everything is setup and ready for the future lessons. It will verify the Arduino is working as intended and that the computer you are using is compatible.


Do you have everything you need?
For this lesson you will need some stuff! Make sure you have this stuff or you will be unable to complete this lesson.
  
Assembled Arduino board, preferably an Uno, Diecimila or Duemilanove (or whatever the latest version is) but NG is OK too.




USB Cable. Standard A-B cable is required. Any length is OK.




9V DC power plug with 2.1mm barrel plug, positive tip (Optional)




4 Rubber bumpers (Optional)


Preparing the Arduino!
Take your Arduino out of its protective bag. Look at it and make sure it looks kinda like this:




Diecimila Arduino


Or like this:


NG Arduino


If there's anything missing or really wrong, make sure to contact the store you bought it from. For example, here is an Arduino that is missing the two round silver capacitors!




OK, now that you are satisfied that your Arduino looks good, put the rubber bumpers on the bottom of the board. This will protect your Arduino from spills and dirty tables. If your table is made out of metal, this is essential!






Download & Install Drivers
Depending on which Arduino and which OS you have there are different instructions


Windows <http://www.ladyada.net/learn/arduino/lesson0-win.html>
Mac OS <http://www.ladyada.net/learn/arduino/lesson0-mac.html>
Linux <http://www.ladyada.net/learn/arduino/lesson0-lin.html>




Power up! (USB) 


Now we are ready for the moment of truth, it's time to plug your Arduino in and power it up. The most common way to do this is to plug one end of the USB cable into the Arduino and the other end into a computer. The computer will then power the Arduino.


The jumper-setting step is only for Diecimila and OLDER arduinos! Make sure the Power Jumper is set correctly. Right next to the USB jack, there is a jumper with 3 pins. If the jumper is on the two pins nearest USB jack, that means you are planning to power the Arduino via the USB cable. If it's on the two pins nearer the DC Jack then it means you are planning to power the Arduino using a 9V battery or wall adapter.


You'll want it place as shown in the picture above.


Make sure your cable is a A-B cable. One end should be thin, rectangular. The other end should be square.


Plug the thin end into your computer





Make sure that the USB cable is plugged in directly to a computer port. Sometimes monitors or keyboards have a USB port you can plug into. Most of the time this is fine, but I strongly suggest you plug it directly into the computer as that will eliminate any possible problems. Same goes for USB hubs. 


Later on, once you've verified you can power the Arduino and upload sketches no problem, then you can try plugging it into other ports.


Plug the square end into your Arduino


You should get a small green light on the right side of the 
Arduino, as shown here.




And a few blinking orange lights, on the left side, as shown in this video (download mp4 here)






If you're plugging it into a Mac or Linux machine, you may not get as much blinking from the orange lights. The video is from plugging into a Windows computer.


If no lights or blinking occurs, double check:

  • Is the USB cable plugged into the computer and into the Arduino?
  • Is the computer on?
  • Is the jumper set correctly?
  • Try another USB port, USB cable, and computer
  • If you still can't get it working, your Arduino may be faulty.



Next its time to install the driver! Follow these links for instructions for each of the supphttp://www.ladyada.net/learn/arduino/lesson0-lin.htmlorted operating systems


Windows <http://www.ladyada.net/learn/arduino/lesson0-win.html>
Mac <http://www.ladyada.net/learn/arduino/lesson0-mac.html>
Linux <http://www.ladyada.net/learn/arduino/lesson0-lin.html>


Power up! (9V DC, optional!)
Another way to power up the Arduino is to plug in a battery or wall adapter into the DC jack.


Verify that you have a 9V DC 100-500mA power adapter, with a 2.1mm barrel plug and positive tip. If the box doesn't have any information about the adapter, you can look for these clues






Make sure the symbol near the bottom of the label is present. It means that the outside of the plug is negative and the inside is positive. A centre-negative plug will not work with the Arduino.


To verify the DC plug is the right shape, just try plugging it in. If it doesn't fit or is wobbly, it's the wrong kind.


You can learn how to test wall adapters using a multimeter here.


The jumper-setting step is only for Diecimila and OLDER arduinos! Make sure the Power Jumper is set correctly. The jumper should be set so that it connects the two pins close to the DC jack




Plug in the adapter and verify you get the green light!


If not, double check:

  • Is the DC adapter plugged in?
  • Is the DC adapter the right kind? Check voltage, polarity, plug size, etc.
  • Is the jumper set correctly?
  • Try another adapter.

If you still can't get it working, your Arduino may be faulty.


(End of Lesson 0)


Arduino Hướng dẫn: Bài 0 - Bắt chuẩn bị


Giới thiệu
Bài học này sẽ không dạy cho bất kỳ thiết bị điện tử, thực sự. Để đảm bảo rằng tất cả mọi thứ là thiết lập và sẵn sàng cho những bài học trong tương lai. Nó sẽ xác minh Arduino đang làm việc như dự định và máy tính bạn đang sử dụng là tương thích.


Bạn có mọi thứ bạn cần?
Đối với bài học này bạn sẽ cần một số công cụ! Hãy chắc chắn rằng bạn có công cụ này hoặc bạn sẽ không thể để hoàn thành bài học này.


Lắp ráp Arduino hội đồng quản trị, tốt hơn một Uno, Diecimila hoặc các Duemilanove (hoặc bất kỳ phiên bản mới nhất) nhưng NG OK quá



 
Cáp USB. Tiêu chuẩn cáp A-B được yêu cầu. Chiều dài bất kỳ là OK.



 
9V DC điện cắm phích cắm thùng 2.1mm, tích cực tip (Tùy chọn)



 
4 Cao su cản (Tùy chọn)


Chuẩn bị các Arduino!
Arduino của bạn ra khỏi túi bảo vệ. Hãy nhìn vào nó và chắc chắn rằng nó trông kinda như thế này:


Diecimila Arduino


Hoặc như sau:



 
NG Arduino


Nếu có bất cứ điều gì thiếu hoặc thực sự sai lầm, làm cho chắc chắn để liên hệ với các cửa hàng bạn đã mua nó từ. Ví dụ, đây là một Arduino đó là mất tích hai tụ bạc tròn!



 
OK, bây giờ bạn hài lòng rằng Arduino của bạn trông tốt, đặt bumpers cao su trên dưới cùng của hội đồng quản trị. Điều này sẽ bảo vệ Arduino của bạn từ sự cố tràn và bàn bẩn. Nếu bảng của bạn được làm bằng kim loại, điều này là điều cần thiết!



Tải về và cài đặt trình điều khiển
Tùy thuộc vào Arduino và hệ điều hành bạn phải có những hướng dẫn khác nhau



Cửa sổ <http://www.ladyada.net/learn/arduino/lesson0-win.html>
Mac OS <http://www.ladyada.net/learn/arduino/lesson0-mac.html>
Linux <http://www.ladyada.net/learn/arduino/lesson0-lin.html>





Tăng sức mạnh! (USB)


Bây giờ chúng tôi đã sẵn sàng cho thời điểm của sự thật, đó là thời gian để cắm Arduino của bạn và sức mạnh nó lên. Cách phổ biến nhất để làm điều này là để cắm một đầu của dây cáp USB vào Arduino và đầu kia vào một máy tính. Các máy tính sau đó sức mạnh Arduino.


Bước jumper thiết lập chỉ cho Diecimila và arduinos NIÊN! Hãy chắc chắn rằng Jumper Power được thiết lập một cách chính xác. Ngay bên cạnh các jack cắm USB, có một jumper 3 chân. Nếu nhảy trên hai chân gần nhất USB jack, điều đó có nghĩa là bạn đang có kế hoạch năng lượng Arduino thông qua cáp USB. Nếu đó là trên hai chân gần Jack DC sau đó nó có nghĩa là bạn đang có kế hoạch điện Arduino bằng cách sử dụng một pin 9V hoặc bộ chuyển đổi tường.


Bạn sẽ muốn đặt như được hiển thị ở trên.


Hãy chắc chắn rằng cáp của bạn là một cáp A-B. Một cuối nên mỏng, hình chữ nhật. Sự kết thúc khác nên là hình vuông.



 
Cắm đầu vào máy tính của bạn mỏng





 
Hãy chắc chắn rằng cáp USB được cắm trực tiếp vào một cổng máy tính. Đôi khi màn hình hoặc bàn phím có một cổng USB bạn có thể cắm vào. Hầu hết thời gian này là tốt, nhưng tôi mạnh mẽ đề nghị bạn cắm trực tiếp vào máy tính như rằng sẽ loại bỏ bất kỳ vấn đề có thể xảy ra. Cùng đi với hub USB.
Sau đó, một khi bạn đã xác minh, bạn có thể điện Arduino và tải lên phác họa không có vấn đề, sau đó bạn có thể thử cắm nó vào cổng khác.


Cắm đầu vuông vào Arduino của bạn



 
Bạn sẽ nhận được một ánh sáng nhỏ màu xanh lá cây ở phía bên phải của Arduino, như được hiển thị ở đây.



 
Và một vài nhấp nháy đèn màu da cam, ở phía bên trái, như thể hiện trong đoạn video này (tải về mp4 ở đây)






Nếu bạn đang cắm nó vào một máy Mac hoặc Linux, bạn có thể nhận được càng nhiều nhấp nháy đèn màu da cam. Video cắm vào một máy tính Windows.


Nếu không có ánh sáng hoặc nhấp nháy xảy ra, kiểm tra:

  • Được cáp USB cắm vào máy tính và vào Arduino?
  • Là máy tính?
  • Các jumper xác lập chính xác?
  • Hãy thử một cổng USB, cáp USB, và máy tính

Nếu bạn vẫn không thể có được nó làm việc, Arduino của bạn có thể bị lỗi.


Tiếp theo thời gian của mình để cài đặt các trình điều khiển! Thực hiện theo các liên kết để được hướng dẫn cho mỗi hệ điều hành được hỗ trợ



Cửa sổ <http://www.ladyada.net/learn/arduino/lesson0-win.html>
Mac <http://www.ladyada.net/learn/arduino/lesson0-mac.html>
Linux <http://www.ladyada.net/learn/arduino/lesson0-lin.html>





Tăng sức mạnh! (9V DC, tùy chọn!)
Một cách khác để tăng sức mạnh Arduino là để cắm vào một bộ chuyển đổi pin hoặc tường vào jack DC.


Xác minh rằng bạn có một sức mạnh bộ chuyển đổi DC 9V 100-500mA, với một plug thùng 2.1mm và đầu tích cực. Nếu hộp không có bất kỳ thông tin nào về bộ chuyển đổi, bạn có thể tìm những manh mối




Hãy chắc chắn rằng các biểu tượng ở gần dưới cùng của nhãn có mặt. Nó có nghĩa là bên ngoài của phích cắm là tiêu cực và bên trong là tích cực. Một plug trung tâm âm sẽ không làm việc với Arduino các.


Để xác minh cắm DC là các hình dạng đúng, chỉ cần cắm nó vào. Nếu nó không phù hợp hoặc là lung lay, đó là loại sai.


Bạn có thể tìm hiểu làm thế nào để kiểm tra bộ điều hợp tường bằng cách sử dụng một vạn năng ở đây.


Bước jumper thiết lập chỉ cho Diecimila và arduinos NIÊN! Hãy chắc chắn rằng Jumper Power được thiết lập một cách chính xác. Nhảy phải được thiết lập để nó kết nối hai chân gần với jack DC




Cắm bộ chuyển đổi và xác minh bạn sẽ có được ánh sáng màu xanh lá cây!


Nếu không, kiểm tra:

  • Được các bộ chuyển đổi DC cắm vào?
  • Là các bộ chuyển đổi DC đúng loại? Kiểm tra điện áp, tính phân cực, cắm kích thước, ...
  • Các jumper xác lập chính xác?
  • Hãy thử một bộ chuyển đổi khác.

Nếu bạn vẫn không thể có được nó làm việc, Arduino của bạn có thể bị lỗi.


(Cuối bài học 0)

No comments:

Post a Comment