Sun SPOT Quick Start Tutorial (https://www.sunspotworld.com/docs/Green/Tutorial/Tutorial.html)

 

Introduction

 
 
Welcome to the World of Sun™ Small Programmable Object Technology - Sun SPOT!

The fact that you can see this on your display means that you have successfully installed the Sun SPOT Software Development Kit (SDK) on your computer. Congratulations! We think that Sun SPOTs are some of the most exciting technology on the planet and we hope you will have a great time working with them.

The Sun SPOTs already have a demo loaded on them, the Ectoplasmic Bouncing Ball demo. These instructions will walk you through

  • learning the Sun SPOT parts and their functions
  • running the Ectoplasmic Bouncing Ball demo on your Sun SPOTs
  • loading and running the Air Text demo on your Sun SPOTs
  • modifying the Air Text demo and compiling, loading, and running the result
  • running a Java program on your workstation that connects with your Sun SPOTs
 

A Short Tour of a Sun SPOT

 
 
How to Open a Sun SPOT

Before we run anything on the Sun SPOT, let's take a look at one of them. You should have three Sun SPOTs. One is a basestation and two are free-range Sun SPOTs.

Pick up one of the free-range Sun SPOTs. There is a lid on the Sun SPOT, sometimes called a Sun roof. You will need to take the lid off to get at some of the switches and LEDs. To open the lid, press firmly on the lid, down and back, on the edge of the lid near the small raised dot. You can think of that small-raised dot as the fingernail-catching dot. The closer to the edge that you press, the easier the lid will open. See the illustrations below:

The opposite end of the lid will pop up. Grasp that opposite end to remove the Sun SPOT lid.

Now that you have opened it, you can see the LEDs and switches on the sensor board.

These are under Java program control, so they will act differently, depending on the application that is running. That fin at the top of the SPOT is the radio fin housing the antenna for the wireless communication.

If you tilt the SPOT so that the fin is away from you, you will see the Control Button.

The Control Button is used to reset the SPOT, to put it to sleep, and to wake it up. If the SPOT is asleep, clicking once, briefly - just a tap - on the Control Button will wake the SPOT up. You may have to press hard, but you don't have to press long. If the SPOT is awake, clicking once on the Control Button will reset the SPOT and restart whatever program it was running. Pressing the Control Button down and holding it down for five seconds will put the SPOT to sleep. Let's try it out:

  • To turn on the SPOT: Pick up one of the free-range SPOTs. Press the SPOT Control Button firmly and briefly, just a tap. You have just turned it on. You should see the LED to the right flicker green for about two seconds. That's the SPOT looking to see if it is connected to a host workstation. Some of the LEDs on the top should also light up because there is a demo on the SPOT that turns them on.
  • To turn off the SPOT: Press the Control Button and hold it down for about five seconds. The LED to the left should flash red twice then go dark. You have just turned the SPOT off.
  • To reset the SPOT: Turn on the SPOT so the preloaded demo is running again. To reset a running SPOT, just tap the Control Button again. The LEDs on the right will flicker green for about two seconds.

That's it! You have mastered the SPOT Control Button.

NOTE: If the free-range Sun SPOT does not boot, if the LED to the right doesn't flicker when you tap the Control Button, the Sun SPOT probably needs to charge its battery. To charge a Sun SPOT battery, attach the SPOT, using the supplied USB cable, to the USB port on a working computer. The USB power will fully charge the Sun SPOT in approximately three hours.

Here is a little more detail on the LEDs that are on either side of the SPOT Control Button.

Those LEDs can be controlled by Java programs on the SPOT, but in ordinary circumstances, they are controlled by the operating environment on the SPOT. The LED on the left will tell you about the power status on the SPOT. Here are its most important signals:

Power LED SignalMeaning
Three red flashesPowering down
Slowly alternate between bright and dim greenCharging from USB; CPU active
Slowly alternate between dim green and offCharging from USB; CPU asleep
Steady dim greenAttached to USB, fully charged; CPU active
Slowly alternate between dim red and off.Battery low.
One short green flashResetting, restarting program.
One bright green pulse, sharp on, soft off
Powering up

The LED on the right is under application control. If that behavior is not changed, the system programs will use it to tell you about the communication status of the SPOT. Here are its most important signals.

Activity LED SignalMeaning
Rapidly flash green
Searching for the host workstation on the USB connection
Flash greenPackets being received from the host workstation
Flash redPackets being sent to the host workstation.

You've taken the basic tour of the Sun SPOT. Now we'd like you to try some demos.

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值