Hello, I am trying to implement interactive table project using arduino MEGA. I am using IR sensor array to sense the hand or any object the store value in matrix and then switch in the corresponding LED's (in scanning mode.) My grid is of 8x8.
I will be sequentially scanning the IR sensor (8 sensors in coloumn at a time). I am planning to connect all the 8 IR to analog pins (from analog 0 to analog 7). But sampling frequency is 100us, and i cant waste so much time so i have lowered down the prescalar to 64, ie:- 60us sampling time.
i have something like this in my mind. matrix[m][n]=analogRead(0); matrix[m+1][n+1]=analogRead(1); matrix[m+2][n+2]=analogRead(2); matrix......=analogRead(3); matrix.....=analogRead(4); matrix.....=analogRead(5); matrix.....=analogRead(6); matrix.....=analogRead(7);
Ok, now here is my question. 1.) Can i do it like this and still get the right values? Will my uC wait for 8*60us to get the right values and then start executing the program? 2.) Any other suggestions?
I am planning to initialize a timer of 500us and then take values from respective ports.