aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/nxt-python-fantom/examples/test_sensors.py
blob: 4c8d2495a684f39ade284e169794726bcfaab544 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python

import nxt.locator
from nxt.sensor import *

b = nxt.locator.find_one_brick()

print 'Touch:', Touch(b, PORT_1).get_sample()
print 'Sound:', Sound(b, PORT_2).get_sample()
print 'Light:', Light(b, PORT_3).get_sample()
print 'Ultrasonic:', Ultrasonic(b, PORT_4).get_sample()