LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

setting up a color sensor on myrio 1900 for I2C

Hi guy, I am actually having a hard time to find a good example to set up my color sensor for my robot by using  myrio 1900/ I2C, is it possible to give me a good explanation how to use use read and write from myrio I2C , especially what does slavery address and byte count , byte reads mean/ corresponding to the attached color sensor datasheet  , I am using 45-2018 model . thank you so much! 

 

dfgg.png

0 Kudos
Message 1 of 6
(5,232 Views)

hey, This might sound stupid, my school wants us to build a robot that would be able to implement the color sensor( datasheet is also attached ), As I pull off the myrio I2C bracket to the block diagram, I am having trouble to identify those input/ output parameters to what's given in the datasheet, like slavery address, byte count, byte read , bytes to write, and I can hardly find any example of this online, more specifically, how should those values given in the datasheet 0x67, 0x34, 0x56 be used in the labview coding? Thanks

 

dfgg.png

 

color sensor datasheet

http://modernroboticsinc.com/Content/Images/uploaded/Sensors/Sensor%20Documentation.pdf

0 Kudos
Message 2 of 6
(5,241 Views)

This might sound stupid, my school wants us to build a robot that would be able to implement the color sensor( datasheet is also attached ), As I pull off the myrio I2C bracket to the block diagram, I am having trouble to identify those input/ output parameters to what's given in the datasheet, like slavery address, byte count, byte read , bytes to wrtie, and I can hardly find any example of this online, more specifically, how should those values given in the datasheet 0x67, 0x34, 0x56 be used in the labview coding? Thanks

color sensor model (45-2018)

 

Color sensor datasheet [45-2018]

 

dfgg.png

0 Kudos
Message 3 of 6
(5,203 Views)

No need to create 3 messages with the same question.

 

They've been merged into a single thread.

Message 4 of 6
(5,164 Views)

Hey Junn,

 

You might get some insight from the I2C examples (Help >> Find Examples >> Search 'i2c'). The 'Generic I2C' Read and Write examples would be a good starting point. I'm not sure if these are the same for myRIO toolkit examples, but it's worth checking.

 

You might also have some luck with the I2C Express VI. This page also explains what the different parameters are (i.e. byte count, bytes to read, etc.). The slave address, per that page, will have to be specified in 7 bits. So use something like a hex -> binary converter to determine what your address values should be.

 

Bdog

 

 

0 Kudos
Message 5 of 6
(5,137 Views)

ohh, Thank you so much for the tip on example finding ( I didn't know there is a example finder,, it seems to be a great way to start off =D)!! 

0 Kudos
Message 6 of 6
(5,133 Views)