bitwisetech / popc

Firmware for Arduino and ESP8266 based coffee roaster control
GNU General Public License v2.0
13 stars 1 forks source link

Issue Compiling #1

Open stamandster opened 4 years ago

stamandster commented 4 years ago

Trying to compile the public package and I'm getting the following errors ...

Arduino: 1.8.10 (Windows 10), Board: "Arduino Uno"

popcEsp:1838:2: error: #endif without #if
 #endif // (WITH_MAX31855 || WITH_MAX6675)
  ^~~~~

popcEsp:1934:2: error: #endif without #if
 #endif
  ^~~~~
...
exit status 1
#endif without #if
bitwisetech commented 4 years ago

Sorry for the compile error, too may 'features' got thrown in . Am I correct in thinking you are using a UNO and MAX31855 ? Tks, BT

stamandster commented 4 years ago

Wow thanks for responding! Yes, I'll be using an Uno and two Max31855's :) for now. I'm hoping to have artisan talk with it for control and logging. I have two relays as well. I appreciate all your help!

bitwisetech commented 4 years ago

OK , If my git-fu is up to par today's version should be fixed. I have changed to default compile switches to Artisan Interfaxe, Single thermocouple, no LCD ( if you compile for LCD without one connected then the sketch will hang). It compiles on a Nano and responds to 'READ' sent on the Serial Console.

Two relays, perhaps you could detail this; the sketch is built for only one relay which can be either slow off-on or PWM ~30Hz. The last time I looked there's not a lot of memory left.

Best, BT

stamandster commented 4 years ago

Wow! That's amazing! Thank you so much! So, one relay is for the heating element and one is for the fan. Also, I'm using two thermocouples. Is there a way to enable a secondary thermocouple via the beginning vars?

Also, newbie here, do I have to compile with the Uno connected, or can I compile to just test?

bitwisetech commented 4 years ago

Two thermocouples is fine, there's a compiler switch " #define WITH_TCPL_2 x" which, when 'x' is set to 1, will include the code for the second thermocouple. Further down you will see "#define TCPL_CSL2 nn" which must reflect the pin being used for Chip Select on the second thermocouple module ( Clock and Master-In are shared on the two modules).
Using the Arduino IDE you can compile without a UNO connected, use Ctrl-R to compile, fix errors etc and use Ctrl-U to compile + upload once the UNO is connected. If you compile with the " #define WITH_VIRTTCPL x" switch set to 1 then the bare UNO ( without thermocouple modules ) will respond to Artisan commands as if a thermocouple is connected and will report temperature changes in response to heater commands from Artisan.

stamandster commented 4 years ago

Wow your awesome! It compiled perfectly! As soon as I get the uno in this week I'll test it out and let you know how it all turned out :)