Product Specifications
Copyright©Terabee2016
Readingthedistanceisdonebysending0x61(thisisthe7bitaddress0x30followedbythe
readbit'1')followedbythreebytereadoperations.Thefirsttwobytesyoureceivearea16
bitwordcontainingthelatestmeasurementinmm,thethirdbyteistheCRC8checksum.
WritingcommandstotheTeraRangerOne:
1. Sendtheaddressbyteconsistingofa7bitbaseaddressandthelastbitindicating
write(‘0’),e.g.0x60forbaseaddress0x30.Allcommandslistedinthetablebelow
arewriteoperations,theanswerwillbeinthenextreadoperationforwhichyouhave
tosendthe7bitaddresswiththereadbitset.
2. Sendthedesiredcommandlistedinthetablebelow.
3. Incasethecommandcreatesananswer,readitbackimmediately.
ReadingdatafromtheTeraRangerOne:
1. Sendtheaddressbyteconsistingof7bitbaseaddressandthelastbitindicating
read(‘1’),e.g.0x61forbaseaddress0x30.
2. Readbackthethenumberofbytesimposedbythecommand,e.g.threebytesfora
distancereading.
Commandin
hexadecimal
Commandname
Commandexplanation
0x01
WHO_AM_I
WritethisvaluetoTROneviaI2Candthe
nextdistancereadingwillcontain0xA1in
thefirstbyte(ignoreothers).Youcanuse
thisfunctiontouniquelyidentifya
TeraRangerOneontheI2Cbus.
0xA2
CHANGE_BASE_ADDR
Commandtochangebaseaddressofthe
TeraRangerOne.Writethisvalue
followedbynewaddresstoset,e.g.send
0x42ifyouwantbaseaddress0x42,
ignoreread/writebits.
Aftersendingthiscommand,powercycle
thedevice.AfterwardsitwilljointheI2C
busasaslaveonthenewaddress.
Please note that the default modes when shipped are “Precise” with “Binary” output for
sensor type A and “Optimal” with “Binary” output for sensor type B (refer to section 5.1 for
thedescriptionofthemodes).TheoperatingmodesfortheI2Cinterfacearesetbydefault.
6 How to connect to Pixhawk autopilot
90 Rue Henri Fabre Website:
01630 St. Genis‐Pouilly Technical support:
France (next to CERN) Commercial:
www.teraranger.com
support@teraranger.com
teraranger@terabee.com
14