라즈베리파이 CDS 조도센서 코드 1 #include #include #include #define CS_ADC7 #define SPI_CHANNEL0 #define SPI_SPEED1000000 int adcRead(char adcChannel) { char buff[3]; int adcValue = 0; buff[0] = 0x06 |((adcChannel & 0x07)>>2); buff[1] = ((adcChannel &0x07)