예제 #1
0
sleep(1)

# Yellow (R: on, G: on, B: off)
led.yellow()
sleep(1)

# Cyan (R: off, G: on, B: on)
led.cyan()
sleep(1)

# Purple (R: on, G: off, B: on)
led.purple()
sleep(1)

# White (R: on, G: on, B: on)
led.white()
sleep(1)

# Off (R: off, G: off, B: off)
led.off()

# Run an interactive shell so you can play (not required)
import code
code.InteractiveConsole(locals=globals()).interact()

########NEW FILE########
__FILENAME__ = servo
#! /usr/bin/env python
"""
This is an example that demonstrates how to use a
servo with BreakfastSerial. It assumes you have a 
예제 #2
0
sleep(1)

# Yellow (R: on, G: on, B: off)
led.yellow()
sleep(1)

# Cyan (R: off, G: on, B: on)
led.cyan()
sleep(1)

# Purple (R: on, G: off, B: on)
led.purple()
sleep(1)

# White (R: on, G: on, B: on)
led.white()
sleep(1)

# Off (R: off, G: off, B: off)
led.off()

# Run an interactive shell so you can play (not required)
import code
code.InteractiveConsole(locals=globals()).interact()

########NEW FILE########
__FILENAME__ = servo
#! /usr/bin/env python
"""
This is an example that demonstrates how to use a
servo with BreakfastSerial. It assumes you have a