Hey all, I'm fairly new to Arduinos and am trying to wire this 24-bit ADC to a Pro Micro.
I found this library to use but I think I have it wired up incorrectly.
Here's the sketch:
#include <ADS1232.h>
#include <SPI.h>
#define SPI_SCK 15
#define SPI_MISO 14
#define SCALE_CS 7
#define SCALE_PDWN 2
#define SCALE_GAIN0 0
#define SCALE_GAIN1 1
#define SCALE_SPEED 3
#define SCALE_A0 4
#define SCALE_TEMP 5
ADS1232 scale_adc(SCALE_CS, SPI_MISO, SCALE_PDWN, SCALE_GAIN0, SCALE_GAIN1, SCALE_SPEED, SCALE_A0, SCALE_TEMP);
void setup() {
Serial.begin(9600);
SPI.begin();
scale_adc.init(ADS1232::GAIN1, ADS1232::FAST);
}
void loop() {
int32_t scaleval;
scaleval = scale_adc.read();
Serial.println(scaleval);
}
The Pro Micro pin out says pin 15 is SPI SLCK and pin 14 is SPI MISO, and those are going to the SCLK and DOUT pins of the ADC respectively. So, I think those are correct. the "SCALE_" pins are all going to the same-named pins on the ADC EXCEPT for SCALE_CS, I'm not sure where that goes and I can't seem to get any different behavior from various pins or unwired.
So, with that out of the way, When I run the sketch all I get is 255. So I'm not sure what exactly is wrong.
Any help is greatly appreciated.