[RSS]

Introduction to SunSpot development using NetBeans for Newbies

By Ashwin Bhat K S and Rajath Shanbag


Some really cool online resources before you read the wiki



Instructions to build a simple demo Sun SPOT application in NetBeans.

  • Install the latest JDK
  • Insert the cd given with the sunspot and run SunSPOTSDKInstaller.jar
  • Just double click the jar file. If it does not open try the following command in the shell or command prompt
java  –jar   SunSPOTSDKInstaller.jar
  • Click “Continue” button, Scroll to the bottom and click "Accept"
  • Put a tick mark to the necessary items to be installed. Select a location for installing the software.
  • If you already have a JDK you will see that Supported JDK found message. You need not put a tick mark against JDK in that case.
  • And then select "Install"
  • Accept the license agreement and select "Next >"
  • Select all the components and select "next"
  • Click next
  • Again click "next" and wait for some time. In the end click "Finish".
  • Say "Next”", Accept the license terms ,give an appropriate installation directory and select an appropriate JVM from the list and finally say finish. This will finish Netbeans 5.5 Installation.
  • Press "Continue"
  • Press "Start IDE"
  • NetBeans 5.5 will now open with a Welcome screen showing various Information and resources about the sunspot.Browse through the excellent resources for more information.
  • Now connect one end of a USB cable to a standalone SUNSPOT ( Thicker of the two SUNSPOTS ) and other end to your computer and follow instructions to install the USB Driver.
Note: The SUNSPOT comes along with USB Driver for windows.
  • Click "Next"
  • Click "Continue Anyway"
  • Now we are Ready to deploy our first SUNSPOT Application
  • Go to “File -> Open Project” in the menu bar.
  • Go to the “Demos” Folder In the SUNSPOT Installation Directory.
  • Here it is C:\Program Files\Sun\SunSPOT\Demos
  • Click on AirText in the Demos folder
  • Click on the “Open Project Folder Button”
  • Now AirText is listed in the projects Window.
  • Click on AirTextDemo.java file in the Project Explorer.
  • In the Right Hand Side In the Editor Window. You can edit the message and the colour to be Shown.
  • This Demo will show "HI This is a Sun SPOT SPOT SPOT SPOT SPOT"
  • The Function swingThis( ) will display the string given as arguments when the SUNSPOT is swung to and fro.
  • The Function setColor will set the color in terms of RGB.
  • Now in the Project Explorer Right Click on AirText and click "Build Project + Deploy to Sun SPOT"
  • In the Output window you will see similar to what is shown below.
"Waiting for target to synchronise..."
"(Please reset SPOT if you dont get a prompt)"
  • Do wait for sometime and Then press the power button of the SUNSPOT which will restart / reset the SPOT.
  • Make sure you get the Encircled message after resetting the SPOT.
"Download operation completed successfully"
  • Congratulations. You have deployed your first Application on your SUNSPOT.
  • Now Swing the SUNSPOT to and fro.
  • The accelerometer inside the SUNSPOT will detect the movement and the LEDs will give an effect of displaying the message .
  • Similarly try the other demos and write an application of your own.
  • Happy Programming :)

See also SUNSPOTwithNetbeans

Attachments

1.PNG Info on 1.PNG 99600 bytes
1.png Info on 1.png 78829 bytes
10.PNG Info on 10.PNG 76126 bytes
10.png Info on 10.png 69278 bytes
11.PNG Info on 11.PNG 106943 bytes
11.png Info on 11.png 75795 bytes
12.PNG Info on 12.PNG 26067 bytes
12.png Info on 12.png 16931 bytes
13.PNG Info on 13.PNG 26527 bytes
13.png Info on 13.png 17343 bytes
14.PNG Info on 14.PNG 31097 bytes
14.png Info on 14.png 23712 bytes
15.jpg Info on 15.jpg 95051 bytes
15.png Info on 15.png 65541 bytes
16.PNG Info on 16.PNG 35181 bytes
16.png Info on 16.png 26881 bytes
17.PNG Info on 17.PNG 52824 bytes
17.png Info on 17.png 30792 bytes
18.PNG Info on 18.PNG 92789 bytes
18.png Info on 18.png 45895 bytes
19.PNG Info on 19.PNG 96312 bytes
19.png Info on 19.png 49368 bytes
2.PNG Info on 2.PNG 54063 bytes
2.png Info on 2.png 39334 bytes
20.PNG Info on 20.PNG 94711 bytes
20.png Info on 20.png 44762 bytes
21.PNG Info on 21.PNG 99191 bytes
21.png Info on 21.png 52858 bytes
22.PNG Info on 22.PNG 97176 bytes
22.png Info on 22.png 51934 bytes
23.PNG Info on 23.PNG 142366 bytes
23.png Info on 23.png 128079 bytes
3.PNG Info on 3.PNG 53313 bytes
3.png Info on 3.png 49077 bytes
4.PNG Info on 4.PNG 50192 bytes
4.png Info on 4.png 37531 bytes
5.PNG Info on 5.PNG 41980 bytes
5.png Info on 5.png 27816 bytes
6.PNG Info on 6.PNG 39037 bytes
6.png Info on 6.png 25681 bytes
7.PNG Info on 7.PNG 38169 bytes
7.png Info on 7.png 25019 bytes
8.PNG Info on 8.PNG 84574 bytes
8.png Info on 8.png 51011 bytes
9.PNG Info on 9.PNG 43575 bytes
9.png Info on 9.png 31760 bytes