Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling firmware with max6675 support #1646

Closed
tibi03 opened this issue Mar 21, 2019 · 1 comment
Closed

compiling firmware with max6675 support #1646

tibi03 opened this issue Mar 21, 2019 · 1 comment
Labels

Comments

@tibi03
Copy link

tibi03 commented Mar 21, 2019

hello,

i am trying to compile the firmware with max6675 sensor support but its failing, i am using the dev code :

In file included from espurna\config/sensors.h:1029:0,
from espurna\config/all.h:36,
from D:/Tibi/ESP8266/espurna-dev/code/espurna/espurna.ino:22:
espurna\config/../sensors/MAX6675.h:140:32: error: 'MAX6675_CS_PIN' was not declared in this scope
unsigned int _pin_cs = MAX6675_CS_PIN;
^
espurna\config/../sensors/MAX6675.h:141:32: error: 'MAX6675_SO_PIN' was not declared in this scope
unsigned int _pin_so = MAX6675_SO_PIN;
^
espurna\config/../sensors/MAX6675.h:142:33: error: 'MAX6675_SCK_PIN' was not declared in this scope
unsigned int _pin_sck = MAX6675_SCK_PIN;
^
Compiling .pioenvs\nodemcu-lolin\lib000\ESP8266WiFi\ESP8266WiFiSTA.cpp.o
D:/Tibi/ESP8266/espurna-dev/code/espurna/sensor.ino: In function 'void _sensorLoad()':
D:/Tibi/ESP8266/espurna-dev/code/espurna/sensor.ino:778:23: error: 'MAX6675_CS_PIN' was not declared in this scope
sensor->setCS(MAX6675_CS_PIN);
^
D:/Tibi/ESP8266/espurna-dev/code/espurna/sensor.ino:779:23: error: 'MAX6675_SO_PIN' was not declared in this scope
sensor->setSO(MAX6675_SO_PIN);
^
D:/Tibi/ESP8266/espurna-dev/code/espurna/sensor.ino:780:24: error: 'MAX6675_SCK_PIN' was not declared in this scope
sensor->setSCK(MAX6675_SCK_PIN);
^
Compiling .pioenvs\nodemcu-lolin\lib000\ESP8266WiFi\ESP8266WiFiScan.cpp.o
Compiling .pioenvs\nodemcu-lolin\lib000\ESP8266WiFi\WiFiClient.cpp.o
Compiling .pioenvs\nodemcu-lolin\lib000\ESP8266WiFi\WiFiClientSecure.cpp.o
Compiling .pioenvs\nodemcu-lolin\lib000\ESP8266WiFi\WiFiServer.cpp.o
*** [.pioenvs\nodemcu-lolin\src\espurna.ino.cpp.o] Error 1

any idea what can be wrong ?

thank you

@mcspr
Copy link
Collaborator

mcspr commented Mar 30, 2019

MAX6675 requires 3 definitions to work: MAX6675_CS_PIN, MAX6675_SO_PIN and MAX6675_SCK_PIN

sensor->setCS(MAX6675_CS_PIN);
sensor->setSO(MAX6675_SO_PIN);
sensor->setSCK(MAX6675_SCK_PIN);

you can modify method params above directly with proper gpio numbers or instead, add #define MAX6675_CS_PIN 4 etc. in header files.
also see code/espurna/config/all.h comment about 'custom.h'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants