Using Eclipse IDE
description
Transcript of Using Eclipse IDE
![Page 1: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/1.jpg)
Using Eclipse IDE
![Page 2: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/2.jpg)
Required Software
• Software– Eclipse SDK
MMN Lab.
![Page 3: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/3.jpg)
About the driver
MMN Lab.
![Page 4: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/4.jpg)
About the driver cont’d
MMN Lab.
![Page 5: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/5.jpg)
About the driver cont’d
• fantom.sys– LEGO NXT driver
• libusb0.sys– Lib-usb driver
• You must have both the two drivers installed on your PC
MMN Lab.
![Page 6: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/6.jpg)
Eclipse Installation
• Extract eclipse-SDK-3.4.1-win32.zip to your desired directory.
• Execute eclipse.exe in the directory.
MMN Lab.
![Page 7: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/7.jpg)
Creating a project
MMN Lab.
![Page 8: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/8.jpg)
Creating a project cont’d
MMN Lab.
![Page 9: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/9.jpg)
Creating external tools
MMN Lab.
![Page 10: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/10.jpg)
Creating external tools cont’d
MMN Lab.
![Page 11: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/11.jpg)
Creating external tools cont’d
MMN Lab.
![Page 12: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/12.jpg)
Creating external tools cont’d
MMN Lab.
![Page 13: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/13.jpg)
Using Eclipse
MMN Lab.
![Page 14: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/14.jpg)
Using Eclipse cont’d
MMN Lab.
![Page 15: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/15.jpg)
Using Eclipse cont’d
MMN Lab.
![Page 16: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/16.jpg)
Some methods
• For LCD class– drawString(String str, int x, int y);– drawString(String str, int x, int y, boolean invert);– drawInt(int i, int x, int y);– drawInt(int i, int places, int x, int y);– drawChar(char c, int x, int y, boolean invert);– clear();
MMN Lab.
![Page 17: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/17.jpg)
Some methods cont’d
• For Button class– 4 instances
• Button.ENTER (code: 1)• Button.LEFT (code: 2)• Button.RIGHT (code: 4)• Button.ESCAPE (code: 8)
– boolean isPressed(); – static int waitForPress() – static int readButtons();
MMN Lab.
![Page 18: Using Eclipse IDE](https://reader036.fdocuments.net/reader036/viewer/2022081418/56815731550346895dc4ced8/html5/thumbnails/18.jpg)
Lab2
• The NXT LCD screen is 16 characters wide and eight characters deep
• Write a program to show all the student numbers of your group in the way just like the staff list in a movie. (Run as infinite loop). After pressing “Enter”, exit the program.
MMN Lab.
x ranges from 0 to 15, and y from 0 to 7.