Re: C++ SPI for Max 31855 Thermocouple Amp
Posted: Fri May 11, 2018 6:37 pm
Kolban,
Again, thanks for the comment above.
You are correct with respect to
"Arduino/hardware/espressif/esp32/libraries/SPI/src/SPI.h "
containing
"void begin(int8_t sck=-1, int8_t miso=-1, int8_t mosi=-1, int8_t ss=-1);"
What I was pointing out, was that in using the Adafruit example for the serialthermocouple.ino, it uses a different SPI.h file.
The file "ArduinoApp/arduino-1.8.5/hardware/arduino/avr/libraries/SPI/src/SPI.h", which is what the Adafruit library is using, only contains "static void begin();"
So when passing a "-1" for the clock, which the example permits, causes the invocation of the Serial.begin() of a method that doesn't have these default values, and the Adafruit example code reports the thermocouple having a problem, while the use of non-hardware VSPI doesn't have this problem. So, to my understanding, there's a problem with the example code if I'm trying to use with VSPI, even after carefully switching the breadboard configuration to make use of the VSPI pins.
AT least that's my interpretation
I'm new to C++, and to ESP32, so I could easily be misunderstanding something.
Thanks,
JavaBen
Again, thanks for the comment above.
You are correct with respect to
"Arduino/hardware/espressif/esp32/libraries/SPI/src/SPI.h "
containing
"void begin(int8_t sck=-1, int8_t miso=-1, int8_t mosi=-1, int8_t ss=-1);"
What I was pointing out, was that in using the Adafruit example for the serialthermocouple.ino, it uses a different SPI.h file.
The file "ArduinoApp/arduino-1.8.5/hardware/arduino/avr/libraries/SPI/src/SPI.h", which is what the Adafruit library is using, only contains "static void begin();"
So when passing a "-1" for the clock, which the example permits, causes the invocation of the Serial.begin() of a method that doesn't have these default values, and the Adafruit example code reports the thermocouple having a problem, while the use of non-hardware VSPI doesn't have this problem. So, to my understanding, there's a problem with the example code if I'm trying to use with VSPI, even after carefully switching the breadboard configuration to make use of the VSPI pins.
AT least that's my interpretation
Thanks,
JavaBen
