SKU:SEN0158 (https://www.dfrobot.com/product-1088.html)
(https://www.dfrobot.com/product-1088.html).

Selelekela
Khamera ena ke kh'amera e nyane e behang IR, e ka latellang lintho tse 4 tsa IR ka nako e le 'ngoe. Lisebelisoa li fapane ebile li fapana ho tloha ho liroboto tsa ho lata tse nang le li-transmitters tsa IR bakeng sa ho tsamaea ho ea ho litšitiso tse bobebe, kapa ho fumana hore na ntho e ea kae.
Ntle le moo, e ka sebetsa joalo ka sensor ea lelakabe, e ka latellang mehloli ea mocheso le boemo ba malakabe.
Sensor e bonolo ho e kenya le ho hokela. Seo u se hlokang feela ke lithapo tse 'ne, tse peli bakeng sa phepelo ea motlakase le tse peli bakeng sa I2C.
Tlhaloso
- Litlhoko tsa tšebeliso ea matla: 3.3V/44mA, 5V/48mA
- Sebaka sa ho lemoha: 0 ~ 3m
- Protocol ea puisano: 12C
- Tsela ea ho lemoha e otlolohileng: likhato tse 33
- Lengeloi le bonang le otlolohileng: likhato tse 23
- Qeto ke 128 × 96 pixel, e nang le ts'ebetso ea setšoantšo sa Hardware, e ka latellang lintho tse 'ne (IR e ntšang kapa e bonahatsang lintho)
- Litekanyo: 32 x 16 (sebopeho sa silinda)
Pinout
- Khubelu - VCC+
- Bosehla – SDA
- Botala – SCL
- Lefifi - GND
Setšoantšo sa Khokahano

SampKhoutu
Taelo
Hang ha khamera e lemoha lets'oao, e tla hlahisa likhokahano tsa eona sebakeng sa pele. 'Me tse ling li tla be li se na letho (e khutlisetsa 1023,1023). Haeba khamera e lemoha lintho tse 'maloa, e tla li hlophisa ho latela tatellano ea ho lemoha. Haeba e mong oa bona a tsoa ho view, boemo boo bo tla be bo se na letho(khutlisa 1023,1023). E ka ts'ehetsa ho latela lintho tse 4 feela ka nako e le 'ngoe.
Khoutu ea Arduino
// Wii Remote IR sensor test sample code by kako http://www.kako.com
// tlhahiso e fetotsoeng bakeng sa lenaneo la Wii-BlobTrack ka RobotFreak http://www.letsmakerobots.com
// fetotsoe bakeng sa https://dfrobot.com ka Lumi, Pherekhong 2014
# kenyeletsa
int IRsensorAddress = 0xB0;
//int IRSensorAddress = 0x58;
int slaveAddress;
int ledPin = 13;
boolean ledState = bohata;
byte data_buf[16];
int i;
int Ix[4];
int Iy[4];
int s;
noid Write_2bytes(byte dl, byte d2)
{
Wire.beginTransmission(LekhobaAterese);
Wire.ngola(dl); Mohala.ngola(d2);
Wire.endTransmission();
}
void setup()
{
mohlankaAddress = IRSensorAddress >> 1; // Sena se fella ka 0x21 joalo ka aterese ho leq
Serial.qala(19200);
pinMode(ledPin, OUTPUT); // Beha pinana ea LED e le tlhahiso
Mohala.qala();
// Sensor ea IR e qala
Write_2bytes(0x30,0x01); delay(10);
Write_2bytes(0x30,0x08); delay(10);
Write_2bytes(0x06,0x90); delay(10);
Write_2bytes(0x08,0xC0); delay(10);
Write_2bytes(0x1A,0x40); delay(10);
Write_2bytes(0x33,0x33); delay(10);
tieho(100);
}
void loop()
{
ledState = !ledState;
haeba (ledState) {digitWrite(ledPin,HIGH); } tse ling {digitWrite(ledPin,LOW); }
// IR sensor e baloa
Wire.beginTransmission(LekhobaAterese);
Mohala.ngola(0x36);
Wire.endTransmission();
WirequestFrom(LekhobaAterese, 16); // Kopa sehlooho sa 2 byte (MSB tloho
bakeng sa (i=0;i<16;i++) {data_buf[i]=0; }
ke=0;
ha(Wire.available() && i <16) {
data_buf[i] = Wire.read();
ke++;
}
Ix[0] = data_buf[1];
Iy[0] = data_buf[2];
s = data_buf[3];
Ix[0] += (s & 0x30) «4;
Iy[0] += (s & 0xC0) «2;
Ix[1] = data_buf[4];
Iy[1] = data_buf[5];
s = data_buf[6];
Ix[1] += (s & 0x30) «4;
Iy[1] += (s & 0xC0) «2;
Ix[2] = data_buf[7];
Iy[2] = data_buf[8];
s = data_buf[9];
Ix[2] += (s & 0x30) «4;
Iy[2] += (s & 0xC0) «2;
Ix[3] = data_buf[10];
Iy[3] = data_buf[11];
s = data_buf[12];
Ix[3] += (s & 0x30) <<4;
Iy[3] += (s & 0xC0) «2;
bakeng sa(i=0; i<4; i++)
{
haeba (Ix[i] <1000)
Seri.print(“”);
haeba (Ix[i] <100)
Seri.print(“”);
haeba (Ix[i] <10)
Seri.print(“”);
Serial.print( int(Ix[i]) );
Seri.print(“,”);
haeba (Iy[i] <1000)
Seri.print(“”);
haeba (Iy[i] <100)
Seri.print(“”);
haeba (Iy[i] <10)
Seri.print(“”);
Serial.print( int(Iy[i]) );
haeba (i<3)
Seri.print(“,”);
}
Serial.println(“”);
tieho(15);
}
Ho sebetsa Code
// Exampe ngotsoe ke Tom Igoe
// E fetotsoe bakeng sa https://www.dfrobot.com ke Lumi, Jan. 2014
/*
Khoutu ena e lokela ho bonts'a blob e le 'ngoe e mebala bakeng sa mohloli o mong le o mong o fumanoeng oa IR (boholo ba bone) ho th
*/
import process.serial.*;
int haeba = 10; // Linefeed ka ASCII
String myString = null;
serial myPort; // Boema-kepe ba serial
ho seta letho () {
// Ngola likou tsohle tse fumanehang tsa serial
println(Serial.list());
// Bula boema-kepe boo u bo sebelisang ka sekhahla seo u se batlang:
myPort = Serial e ncha(ena, Serial.list()[0], 19200);
myPort.clear();
// Lahlela ho bala ha pele, haeba re ka qala ho bala
// bohareng ba kgwele ho tswa ho motho ya rometseng.
myString = myPort.readStringUntil(lf);
myString = null;
boholo (800,800);
//frameRate(30);
}
void draw() {
bokamorao(77);
//ha (myPort.available()> 0) {
myString = myPort.readStringUntil(lf);
haeba (myString != null) {
int[] tlhahiso = int (split(myString, ',I)),
println(myString); // bontsha thapo e kenang
int xx = tlhahiso[0];
int yy = tlhahiso[1];
int ww = tlhahiso[2];
int zz = tlhahiso[3];
int xxx = tlhahiso[4];
int yyy = tlhahiso[5];
int www = tlhahiso[6];
int zzz = tlhahiso[7];
ellipseMode(RADIUS); // Beha ellipseMode ho RADIUS
tlatsa(255, 0, 0); // Beha ho tlala bosweu
ellipse(xx, yy, 20, 20);
ellipseMode(RADIUS); // Beha ellipseMode ho RADIUS
tlatsa(0, 255, 0); // Beha ho tlala bosweu
ellipse(ww, zz, 20, 20);
ellipseMode(RADIUS); // Beha ellipseMode ho RADIUS
tlatsa(0, 0, 255); // Beha ho tlala bosweu
ellipse(xxx, yyy, 20, 20);
ellipseMode(RADIUS); // Beha ellipseMode ho RADIUS
tlatsa(255); // Beha ho tlala bosweu
ellipse(www, zzz, 20, 20);
}
}
LBH
| Q&A | Mathata a mang a akaretsang a Arduino/FAQ/Tips |
| Q | Karolo ea SEN0158 ke efe? |
| A | Ke M18. |
| Q | Bukeng ea tataiso, e bolela hore angle ea ho bona e otlolohileng ke likhato tse 33, Q ha angle ea ho lemoha e otlolohileng e le likhato tse 23. Ke khetholla joang hore na ke efe e tšekaletseng le e emeng? |
| A | Ka kopo bala haholoanyane mona, Wiimote/Pointing> Ho Fumana Sensor Bar (http://wiibrew.org/wiki/Wiimote/Pointing). |
Bakeng sa lipotso / likeletso / mehopolo e pholileng eo u ka e arolelanang, ka kopo etela DFRobot Forum
(https://www.dfrobot.com/forum/).
Litokomane tse ling
- SEN0158 Litekanyo
(https://dfimg.dfrobot.com/5d303ff74db88f1df9d80a04/wiki/44cdc19545c0e4e6bbd98cecd7a1264d.zip) - Setšoantšo sa SEN0158 3D
(https://dfimg.dfrobot.com/5d303ff74db88f1df9d80a04/wiki/a67e1109a29fe0f858c271300817c379.zip)
Litokomane / Lisebelisoa
![]() |
DFRobot SEN0158 Gravity IR Positioning Camera [pdf] Bukana ea Mosebelisi A700000013081448, SEN0158 Gravity IR Positioning Camera, SEN0158, Gravity IR Positioning Camera, IR Positioning Camera, Positioning Camera, Camera |
