summaryrefslogtreecommitdiff
path: root/Resources/OpenPLCv2/firmware/ADC.test.arduino/spi_ads1018/spi_ads1018.ino
blob: 8e1290acc3ed120001cee0b39d6a673f82a5e253 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include<SPI.h>

/* ADS1018 settings */

const long int speedMaximum = 4000000; // frequency of communication
const char dataOrder = MSBFIRST;
const char dataMode = SPI_MODE1;

void setup() {
  
  Serial.begin(9600); //start serial
  SPI.begin(); // start SPI library

}

void loop() {

  SPI.beginTransaction(SPISettings(speedMaximum, dataOrder, dataMode));
  
}