mille-feuilleAutomatic Schematic Creation Tool

* Proximity Sensor *

step

Features

proximity

Download datasheet

Main component : SFH 9206 - 反射型フォトリフレクタ

• 940nm emitter in combination with a silicon NPN phototransistor
• Optimal operating distance 1 mm to 5 mm
• Daylight cut-off filter
• Emitter and detector electrically isolated
• Soldering Methode: IR Reflow Soldering
• Position reporting
• End position switch
• Speed monitoring and regulating
• Motion transmitter

step

Programming

Sample program
ProximityTest.py

* functions *
import Proximity

def getInfo(Number) : デバイスボードの情報を取得します
Number : 接続するベースボードのコネクタ番号を指定します

def power(milModClass, OnOff) : センサーの赤外線LEDのON、OFFを制御
milModClass : module instance
OnOff : LED power ON(1) and OFF(0). 0.5 secのウォームアップが必要です。
デバイスの接続にはholdConnect(milModClass) and holdDisconnect(milModClass)

def read() :赤外線の反射を読む
return

Example:
Proximity.holdConnect(mod0)
Proximity.power(mod0,1)#power ON
time.sleep(0.5)#worm up
Proximity.holdDisconnect(mod0)

...

Proximity.holdConnect(mod0)
readData = Proximity.read(mod0)
print "read data = ",readData
Proximity.holdDisconnect(mod0)