Code for tmp36g7 worked 6 months ago, Now Doesn't

I created a simple code to get my room temp 6 months ago I tried to update it to work with Spark.publish() and I got all these errors.

In file included from ../inc/spark_wiring.h:29:0,
                 from OneWire/OneWire.h:8,
                 from OneWire/OneWire.cpp:131:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
 #warning  "Defaulting to Release Build"
  ^
In file included from OneWire/OneWire.cpp:131:0:
OneWire/OneWire.h:31:0: warning: "FALSE" redefined [enabled by default]
 #define FALSE 0
 ^
In file included from ../../core-common-lib/CC3000_Host_Driver/cc3000_common.h:38:0,
                 from ../../core-common-lib/SPARK_Firmware_Driver/inc/hw_config.h:35,
                 from ../inc/main.h:37,
                 from ../inc/spark_utilities.h:30,
                 from ../inc/spark_wiring.h:33,
                 from OneWire/OneWire.h:8,
                 from OneWire/OneWire.cpp:131:
../../core-common-lib/CC3000_Host_Driver/data_types.h:53:0: note: this is the location of the previous definition
 #define FALSE         (0)
 ^
In file included from OneWire/OneWire.cpp:131:0:
OneWire/OneWire.h:32:0: warning: "TRUE" redefined [enabled by default]
 #define TRUE  1
 ^
In file included from ../../core-common-lib/CC3000_Host_Driver/cc3000_common.h:38:0,
                 from ../../core-common-lib/SPARK_Firmware_Driver/inc/hw_config.h:35,
                 from ../inc/main.h:37,
                 from ../inc/spark_utilities.h:30,
                 from ../inc/spark_wiring.h:33,
                 from OneWire/OneWire.h:8,
                 from OneWire/OneWire.cpp:131:
../../core-common-lib/CC3000_Host_Driver/data_types.h:57:0: note: this is the location of the previous definition
 #define TRUE          (!FALSE)
 ^
In file included from ../inc/spark_wiring.h:29:0,
                 from ../inc/application.h:29,
                 from spark-dallas-temperature/spark-dallas-temperature.h:26,
                 from spark-dallas-temperature/spark-dallas-temperature.cpp:12:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
 #warning  "Defaulting to Release Build"
  ^
In file included from spark-dallas-temperature/spark-dallas-temperature.h:27:0,
                 from spark-dallas-temperature/spark-dallas-temperature.cpp:12:
spark-dallas-temperature/../OneWire/OneWire.h:31:0: warning: "FALSE" redefined [enabled by default]
 #define FALSE 0
 ^
In file included from ../../core-common-lib/CC3000_Host_Driver/cc3000_common.h:38:0,
                 from ../../core-common-lib/SPARK_Firmware_Driver/inc/hw_config.h:35,
                 from ../inc/main.h:37,
                 from ../inc/spark_utilities.h:30,
                 from ../inc/spark_wiring.h:33,
                 from ../inc/application.h:29,
                 from spark-dallas-temperature/spark-dallas-temperature.h:26,
                 from spark-dallas-temperature/spark-dallas-temperature.cpp:12:
../../core-common-lib/CC3000_Host_Driver/data_types.h:53:0: note: this is the location of the previous definition
 #define FALSE         (0)
 ^
In file included from spark-dallas-temperature/spark-dallas-temperature.h:27:0,
                 from spark-dallas-temperature/spark-dallas-temperature.cpp:12:
spark-dallas-temperature/../OneWire/OneWire.h:32:0: warning: "TRUE" redefined [enabled by default]
 #define TRUE  1
 ^
In file included from ../../core-common-lib/CC3000_Host_Driver/cc3000_common.h:38:0,
                 from ../../core-common-lib/SPARK_Firmware_Driver/inc/hw_config.h:35,
                 from ../inc/main.h:37,
                 from ../inc/spark_utilities.h:30,
                 from ../inc/spark_wiring.h:33,
                 from ../inc/application.h:29,
                 from spark-dallas-temperature/spark-dallas-temperature.h:26,
                 from spark-dallas-temperature/spark-dallas-temperature.cpp:12:
../../core-common-lib/CC3000_Host_Driver/data_types.h:57:0: note: this is the location of the previous definition
 #define TRUE          (!FALSE)
 ^
In file included from ../inc/spark_wiring.h:29:0,
                 from ../inc/application.h:29,
                 from tmp36g7.cpp:2:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
 #warning  "Defaulting to Release Build"
  ^
tmp36g7.cpp: In function 'void loop()':
tmp36g7.cpp:36:51: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   voltage = (reading * 3.3) / 4095;
                                                   ^

In file included from ../inc/spark_wiring.h:33:0,
                 from ../inc/application.h:29,
                 from tmp36g7.cpp:2:
../inc/spark_utilities.h:112:14: error:   initializing argument 2 of 'static void SparkClass::publish(const char*, const char*, int)' [-fpermissive]
  static void publish(const char *eventName, const char *eventData, int ttl);
              ^

make: *** [tmp36g7.o] Error 1

What Changed? Was it something I did? The library did? Some Particle did?

Please let me know if it would be helpful to post my code.

When in doubt, post your code :wink: It won’t hurt, and it’ll make debugging a bit easier.

1 Like