This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Interactive_Table() | |
{ | |
if ( (unsigned long) (micros() - samplingtime) > 200 ) // Read 8 phototransistors every 200us | |
{ | |
// Read 8 phototransistors every 200us and store data into array | |
phototransistor_data[0 + photo_adder] = analogRead(A0); | |
phototransistor_data[8 + photo_adder] = analogRead(A1); | |
phototransistor_data[16 + photo_adder] = analogRead(A2); | |
phototransistor_data[24 + photo_adder] = analogRead(A3); | |
phototransistor_data[32 + photo_adder] = analogRead(A4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//************************************************************************************************************// | |
// The 8x8 Interactive RGB LED Table | |
//************************************************************************************************************// | |
#include <SPI.h>// SPI Library used to clock data out to the shift registers | |
#define latch_pin 4// Defines actual BIT of PortD for latch - is Arduino UNO pin 2, MEGA pin 4 | |
#define blank_pin 5// Defines actual BIT of PortD for blank - is Arduino UNO pin 3, MEGA pin 5 |
NewerOlder