Đang chuẩn bị liên kết để tải về tài liệu:
Practical Arduino Cool Projects for Open Source Hardware- P44

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Practical Arduino Cool Projects for Open Source Hardware- P44: A schematic or circuit diagram is a diagram that describes the interconnections in an electrical or electronic device. In the projects presented in Practical Arduino, we’ve taken the approach of providing both a photograph and/or line drawing of the completed device along with a schematic. While learning to read schematics takes a modest investment of your time, it will prove useful time and time again as you develop your projects. With that in mind, we present a quick how-to in this section | CHAPTER 16 RESOURCES Add a file called keywords.txt to your library directory and list the class and functions in it. After each one add a single tab not spaces and specify whether it is a class KEYWORD1 or method KEYWORD2 . In our case we have just one class and one public method so the end result looks like this TouchScreen KEYWORD1 read KEYWORD2 If our class happened to have more methods in it they would also be labeled with KEYWORD2. The IDE will then highlight anything labeled KEYWORD1 in orange and anything labeled KEYWORD2 in brown. Restart your IDE open the example ReadTouchscreen program again and you should see that the syntax highlighting is now correct. The complete TouchScreen library is available for download from GitHub so if you want to see the end result and how it all fits together you can grab it from github.com practicalarduino TouchScreen. Platform-Specific Variations Most of the time you can write a library that will run perfectly well on just about any Arduino from a Mini to a Mega with no changes required. Sometimes though there are differences between the various Arduino models that can cause problems and the TouchScreen library we used in this example is one of them. The code as described here will work perfectly well on almost all Arduino models but will break on a Mega because it has a different system for numbering its analog and digital pins. On most Arduino models analog pins 0 through 5 can also be referenced as digital pins 14 through 19 and we do that in the library by simply adding 14 to the analog pin number to derive the digital pin number. But the Mega has far more I O pins so rather than starting the analog pins at number 14 it starts them at number 54. The result is that the code we ve created here will appear to compile cleanly on a Mega but will totally fail to work because it will be referencing the wrong pins. Luckily this problem is made very easy to solve because we used a define to specify the value for DIGITAL_OFFSET

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.