Search results for Nano Pi

Grove - 3-Axis Compass V1.0

Grove - 3-Axis Compass V1.0

...the demos' directory: cd yourpath/GrovePi/Software/Python/ To see the code nano grove_compass_lib.py nano grove_compass_example.py import grove_compass_lib c=grove_compass_lib.compass() while True: print "X:",c.x,"Y:",c.y,"X:",c.z,"Heading:",c.headingDegrees c.update() time.sleep(.1) 5.Run the demo....

Grove - MOSFET

Grove - MOSFET

...the demos' directory: cd yourpath/GrovePi/Software/Python/ To see the code nano grove_mosfet.py # "Ctrl+x" to exit # import time import grovepi # Connect the Grove MOSFET to analog port D6 # SIG,NC,VCC,GND mosfet = 6 grovepi.pinMode(mosfet,"OUTPUT") time.sleep(1) while True: try: # ...

Grove - Collision Sensor

Grove - Collision Sensor

...e demos' directory: cd yourpath/GrovePi/Software/Python/ To see the code nano grove_collision_sensor.py # "Ctrl+x" to exit # import time import grovepi # Connect the Grove Collision Sensor to digital port D2 # SIG,NC,VCC,GND collision_sensor = 2 grovepi.pinMode(collision_sensor,"INPUT") wh...

Grove - GPS

Grove - GPS

...os' directory: cd yourpath/GrovePi/Software/Python/ To see the code nano grove_gps.py # "Ctrl+x" to exit # import serial, time import smbus import math import RPi.GPIO as GPIO import struct import sys ser = serial.Serial('/dev/ttyAMA0', 9600, timeout = 0) #Open the serial port at 9600 baud...

Grove LED Bar v2.0

Grove LED Bar v2.0

...the demos' directory: cd yourpath/GrovePi/Software/Python/ To see the code nano grove_ledbar.py # "Ctrl+x" to exit # import time import grovepi import random # Connect the Grove LED Bar to digital port D5 # DI,DCKI,VCC,GND ledbar = 5 grovepi.pinMode(ledbar,"OUTPUT") time.sleep(1) i = 0 # LED Ba...

Digital light sensor v1.0

Digital light sensor v1.0

...th/GrovePi/Software/Python/grove_i2c_digital_light_sensor/ To see the code nano grove_i2c_digital_light_sensor.py # "Ctrl+x" to exit # import time import smbus from Adafruit_I2C import Adafruit_I2C import RPi.GPIO as GPIO import grovepi from smbus import SMBus global I2C_ADDRESS global I2C_SMBUS gl...