tailieunhanh - LEGO MINDSTORMS - The Unofficial Guide to Robots - Jonathan B. Knudsen Part 5

Tham khảo tài liệu 'lego mindstorms - the unofficial guide to robots - jonathan b. knudsen part 5', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 70 PlayTone 311 SIXTH PlayTone 277 3 BEAT Wait 4 SIXTH 3 BEAT HALF PlayTone 277 HALF PlayTone 311 HALF PlayTone 370 GRACE PlayTone 330 HALF PlayTone 311 HALF Wait 2 HALF PlayTone 277 HALF PlayTone 330 HALF PlayTone 220 HALF PlayTone 220 2 BEAT Wait GRACE 5 HALF 2 BEAT HALF PlayTone 247 HALF PlayTone 277 HALF PlayTone 330 GRACE PlayTone 311 HALF PlayTone 277 HALF Wait 2 HALF PlayTone 247 HALF PlayTone 311 HALF PlayTone 208 HALF PlayTone 208 2 BEAT Wait GRACE 5 HALF 2 BEAT HALF IR Communication Your robot can send and receive data over its IR port. In NQC three commands handle sending and receiving data SendMessage expression m This command sends the given byte of data out the IR port. Message Use this command to return the last byte of data received on the IR port. ClearMessage This command clears the incoming message. You may want to do this after responding to an incoming message to avoid responding more than once. The Display Although you can t control the display directly in NQC you can configure it to some degree SelectDisplay expression v This command tells the RCX to show the data source represented by v on its display. The legal values for v are shown in Table 4-6. You can achieve the same results by pressing the View button on the front of the RCX to show the state of the inputs or outputs but the SelectDisplay command allow you to do this as part of a program. 71 Table 4-6. Display Values Value Description 0 System clock 1 View Input 1 2 View Input 2 3 View Input 3 4 View Output A 5 View Output B 6 View Output C You can set the clock in the RCX using the following macro SetWatch const hours const minutes Use this macro to set the current time of the RCX s clock. Unfortunately only constant values can be used. The Datalog With the default firmware your RCX supports an interesting option called a dtalog. The datalog is simply a list of numbers. You can create a new datalog and put numbers into it. Datalogs can be uploaded to your PC for analysis or display.

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
8    193    0    20-05-2024
23    166    0    20-05-2024
24    115    0    20-05-2024
165    94    0    20-05-2024
12    154    0    20-05-2024
crossorigin="anonymous">
Đã 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.