diff options
author | Akshay Chipkar | 2019-05-10 09:47:11 +0530 |
---|---|---|
committer | GitHub | 2019-05-10 09:47:11 +0530 |
commit | d613a4e0e6279c00bcb44312068ee09574b1d656 (patch) | |
tree | 92481d6eef3a592171112787050223ec3ed069c4 /Resources/OpenPLCv2/firmware/ADC.test.arduino/spi_ads1018 | |
parent | 4ca104e399f96e59de660e082d4e1a0013e44307 (diff) | |
parent | 4a1414b2f3e4f98244ac624b14604458e850e6cd (diff) | |
download | OpenPLC-d613a4e0e6279c00bcb44312068ee09574b1d656.tar.gz OpenPLC-d613a4e0e6279c00bcb44312068ee09574b1d656.tar.bz2 OpenPLC-d613a4e0e6279c00bcb44312068ee09574b1d656.zip |
Merge pull request #11 from VishnuEaswaran/master
rectified the mistake in the motor gerber file
Diffstat (limited to 'Resources/OpenPLCv2/firmware/ADC.test.arduino/spi_ads1018')
-rw-r--r-- | Resources/OpenPLCv2/firmware/ADC.test.arduino/spi_ads1018/spi_ads1018.ino | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Resources/OpenPLCv2/firmware/ADC.test.arduino/spi_ads1018/spi_ads1018.ino b/Resources/OpenPLCv2/firmware/ADC.test.arduino/spi_ads1018/spi_ads1018.ino new file mode 100644 index 0000000..8e1290a --- /dev/null +++ b/Resources/OpenPLCv2/firmware/ADC.test.arduino/spi_ads1018/spi_ads1018.ino @@ -0,0 +1,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)); + +} |