#include "Arduino.h"
#include "AgingColumn.h"
#include "SPI.h"

void AgingColumn::init(uint8_t ssPin) {
	this->ssPin = ssPin;
	pinMode(ssPin, OUTPUT);
	digitalWrite(ssPin, HIGH);
	sendByte();
}

void AgingColumn::sendByte() {
	SPI.beginTransaction(SPISettings(100000, MSBFIRST, SPI_MODE0));
    digitalWrite(ssPin, LOW);
    SPI.transfer(0);
    digitalWrite(ssPin, HIGH);
    SPI.endTransaction();
}
