Ejemplo n.º 1
0
def main(args=None):
    movuino = mvn.Movuino("127.0.0.1", 3010, 3011)
    movuino.start()

    movuino.vibroNow(True)
    time.sleep(1)
    movuino.vibroNow(False)

    timer0 = time.time()
    while (time.time() - timer0 < 1):
        print movuino.ax, movuino.ay, movuino.az
        print movuino.gx, movuino.gy, movuino.gz
        print movuino.mx, movuino.my, movuino.mz
        print movuino.repAcc, movuino.repGyr, movuino.repMag
        print movuino.xmmId, movuino.xmmProg
        time.sleep(.05)

    movuino.vibroPulse(150, 100, 3)

    movuino.stop()
Ejemplo n.º 2
0
def main(args = None):
	computerIP = "192.168.0.101" # set here your computer IP
	movuinoIP = "192.168.0.100" # set here your Movuino IP once its connected to the same wifi network as your computer
	movuino = mvn.Movuino(computerIP, movuinoIP, 7400, 7401)
	movuino.start()

	movuino.vibroNow(True)
	time.sleep(1)
	movuino.vibroNow(False)

	timer0 = time.time()
	while (time.time()-timer0 < 1):
		print "Accelerometer data:", movuino.ax, movuino.ay, movuino.az
		print "Gyroscope data:", movuino.gx, movuino.gy, movuino.gz
		print "Magnetometer data:", movuino.mx, movuino.my, movuino.mz
		print "---"
		time.sleep(.05)
	
	movuino.vibroPulse(150,100,3)

	movuino.stop()
Ejemplo n.º 3
0
import sys
import time
from threading import Thread
import Movuino as mvn

#####################################################################
####################		MOVUINOS			#####################
#####################################################################

# COMPUTER
computerIP = "150.10.147.70"  # set here your computer IP

# MOVUINO MASTER
movuino1IP = "150.10.147.14"  # set here your Movuino master IP once its connected to the same wifi network as your computer
movuino1 = mvn.Movuino(computerIP, movuino1IP, 7400,
                       7401)  # 7400 port out // 7401 port in

# MOVUINO SLAVE
movuino2IP = "150.10.147.15"  # set here your Movuino slave IP once its connected to the same wifi network as your computer
movuino2 = mvn.Movuino(computerIP, movuino2IP, 7500, 7501)

#-----------------------#


def setMovuinosNeopix(mvn1_, mvn2_, red_, green_, blue_):
    mvn1_.setNeoPix(red_, green_, blue_)
    mvn2_.setNeoPix(red_, green_, blue_)


def printMovuinoData(mvn_):
    print "Movuino ID:", mvn_.id
Ejemplo n.º 4
0
import sys
import time
from threading import Thread
import Movuino as mvn

#####################################################################
#####################		MOVUINO			#########################
#####################################################################

# COMPUTER
computerIP = "127.0.0.1"  # set local ip adress

# MOVUINO MASTER
movuinoIP = "127.0.0.1"  # set local ip adress
movuino = mvn.Movuino(computerIP, movuinoIP, 3000, 3001)  # port in // port out


#####################################################################
####################		 MAIN				#####################
#####################################################################
def main(args=None):
    movuino.start()  # start thread and OSC communication
    # -----------------------#
    # -----------------------#
    # -----------------------#

    movuino.vibroNow(True)  # activate continuous vibrations on Movuino
    time.sleep(0.5)
    movuino.vibroNow(False)  # turn off vibration on Movuino

    timer0 = time.time()
import sys
import time
from threading import Thread
import Movuino as mvn

#####################################################################
#####################		MOVUINO			#########################
#####################################################################

# COMPUTER
computerIP = "192.168.43.116"  # set here your computer IP

# MOVUINO MASTER
movuinoIP = "192.168.43.236"  # set here your Movuino IP once its connected to the same wifi network as your computer
movuino = mvn.Movuino(computerIP, movuinoIP, 7400, 7401)  # port in // port out


#####################################################################
####################		 MAIN				#####################
#####################################################################
def main(args=None):
    movuino.start()  # start thread and OSC communication

    #-----------------------#
    #-----------------------#
    #-----------------------#

    movuino.vibroNow(True)  # activate continuous vibrations on Movuino
    movuino.setNeoPix(255, 0, 0)  # set pixel color on Movuino to red
    time.sleep(0.5)
    movuino.vibroNow(False)  # turn off vibration on Movuino