Sun SPOT Quick Start Tutorial:Changing the Air Text Demo(https://www.sunspotworld.com/docs/Green/Tutorial/ModifyAirText.html)

 

Changing the Air Text Demo

 
 

The Air Text demo is easy to change.

First, copy the existing project. Right-click on "AirText" and select "Copy Project" from the menu.

A dialog box will display. Enter a new name for your version of the project:

Make your new project the current project by right-clicking on the project name and selecting "Set Main Project". In the Project window, click on the plus to the left of the project name to expand the project node. Now, expand the "src" node, then the "org.sunspotworld.demo" package. Select "AirTextDemo.java" from the files displayed.

The source code for AirTextDemo.java will display in the window to the right. Scroll the window on the right down to lines 50 or so. There you will see a series of calls to disp.SwingThis. Change the string "Hi!" to "Yes!".

Now go through the steps previously outlined to deploy and run the new code. When you deploy, the system automatically saves and compiles your changes.

Unplug the Sun SPOT from the USB cable. Now move it back and forth in the air and see if your changes have made it onto the Sun SPOT and are running.

Congratulations! You have mastered the "Hello, world" application of Sun SPOTs!

Now we would like to show you how the Sun SPOT basestation can be used to connect to the free-range Sun SPOTs.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值