Hello all,

 

im trying to figure how to make the MRL interpretate my finger sensores!

 

im using the latest stable version 1.0.1412, foam sensors.

Basically im wondering if there is any script i can be based on to implement on a script how to read the presure to stop a moovement or to activate a finction for a certain pressure etc!!

 

pls help :)

moz4r

8 years 4 months ago

Hi ! if i try i will try something like this :

 

arduino = Runtime.createAndStart("arduino", "Arduino")
arduino.connect("COM1") # change this

readAnalogPin = 0 # change this
arduino.setSampleRate(9600)  # change this
arduino.addListener("publishPin", "python", "publishPin")
arduino.analogReadPollingStart(readAnalogPin)

def publishPin(pin):
  print pin.pin, pin.value
  if (pin.value >= X):
     print ("hello world")