Hal Albach,
Because it just return 255,the Sparkfun board can detect 8 infrared for 8 bits,but I do anything it always return 255.
So I'm not sure isn't the 255 is for the Sparkfun board I2C commuicating.
You do realize this small piece of code is nothing more than reading register 0x0F twice a second, forever. It is not a complete program for setting up and running the line following array. That will require a whole lot more programming. What we accomplished so far is to get the Activity Board and the Sparkfun Board communicating, which it was not before. Now your real work can begin to write that program.
Hal Albach,
Thank you very much for teaching me how to use I2C communicating.Finally I find how to get data form Sparkfun Board.
But it was "255-the Spasrkfun detecting bits".I will try to get it better, thank so much~
On the bottom of the board are 8 pairs of IR led/IR sensors. Basically you will have to send a code to the board that will turn on the IR LED's and then continuously read the IR Sensors. The sensors that are over a dark area will return a logic level that represents "dark" and those sensors that are over a white area will return a logic level that represents white. Each sensor will be represented as a bit in a byte. Your program will then analyze that byte to determine where it is dark and where it is light. You will have to read the data sheets that Sparkfun has provided to determine how this will be done. You might be able to look at the Arduino code but it is written in C++ which can be difficult to understand. Now Simpleide does include a C++ compiler but it does not support some of the things that the Arduino programs do, such as classes. Much of the Arduino code actually calls on various libraries to carry out the tasks so you will probably spend a lot of time finding the various functions and then figure out what they do.
Well, it is going on 0300 and I am way past my bedtime. Good luck.
Hal Albach,
Thank for remind,and I read the SX1509 datasheet and find how to read the data.I think it will be easier for the next time to use I2C program.
NOW, I will have a happy time to complete this program.Thank so much~
Comments
I hope to see a change in the output display, can't quite figure out how it comes up with 9720 when we are telling it to print one byte ( 0 - 255 ) !
It is not output 9720,but it output 255 but the promble is the same,it still output 255,it can't detect.
Because it just return 255,the Sparkfun board can detect 8 infrared for 8 bits,but I do anything it always return 255.
So I'm not sure isn't the 255 is for the Sparkfun board I2C commuicating.
Is it communicating Activity Board and Sparkfun Board?If it is, how to get the data for SimpleIDE?
Thank you very much for teaching me how to use I2C communicating.Finally I find how to get data form Sparkfun Board.
But it was "255-the Spasrkfun detecting bits".I will try to get it better, thank so much~
Well, it is going on 0300 and I am way past my bedtime. Good luck.
Thank for remind,and I read the SX1509 datasheet and find how to read the data.I think it will be easier for the next time to use I2C program.
NOW, I will have a happy time to complete this program.Thank so much~