C++ requires a type specifier for all declarations
Re: C++ requires a type specifier for all declarations
@amatilda
I used the links for 3.7 and it resolved the issues.
I used the links for 3.7 and it resolved the issues.
Re: C++ requires a type specifier for all declarations
Where did you get this link?lanbrown wrote: ↑27 Aug 2022 07:48
It should actually be this URL:
https://z-uno.z-wave.me/files/z-uno2/pa ... index.json
Re: C++ requires a type specifier for all declarations
It was a guess. When I kept seeing errors about the toolchain and for the G1 board, I thought that maybe the link in the documentation was wrong. So I added a 2 to z-uno to see if that would work and it did. Well, sort of. It no longer complained about a G1 toolchain for a G2 board but still had the issue with compiling. I believe PoltoS is going to update the links/documentation for the G2 which should alleviate the issue.amatilda wrote: ↑29 Aug 2022 19:22Where did you get this link?lanbrown wrote: ↑27 Aug 2022 07:48
It should actually be this URL:
https://z-uno.z-wave.me/files/z-uno2/pa ... index.json
Re: C++ requires a type specifier for all declarations
When uploading the sketch I get this error and that file is not there:
There is a file that is similar in name of OneWire_temperature_sensor_DS18B20.ino
I cannot find the file anywhere. I'm using 3.7 (listed as 3.07). I tried the beta (3.8) but it produced even more errors.
So there is light at the end of the tunnel.
Code: Select all
Couldn't determine program size
Needed file "C:\Users\user\AppData\Local\Temp\2\arduino_build_253281\OneWire_temperature_sensor_DS18B20_ino_signed.bin" doesn't exist. Build the sketch first!
An error occurred while uploading the sketch
I cannot find the file anywhere. I'm using 3.7 (listed as 3.07). I tried the beta (3.8) but it produced even more errors.
So there is light at the end of the tunnel.
Re: C++ requires a type specifier for all declarations
lanbrown wrote: ↑29 Aug 2022 20:00When uploading the sketch I get this error and that file is not there:There is a file that is similar in name of OneWire_temperature_sensor_DS18B20.inoCode: Select all
Couldn't determine program size Needed file "C:\Users\user\AppData\Local\Temp\2\arduino_build_253281\OneWire_temperature_sensor_DS18B20_ino_signed.bin" doesn't exist. Build the sketch first! An error occurred while uploading the sketch
I cannot find the file anywhere. I'm using 3.7 (listed as 3.07). I tried the beta (3.8) but it produced even more errors.
So there is light at the end of the tunnel.
"When uploading the sketch I get this error and that file is not there" - what sketch and what version of z-uno?
" I tried the beta (3.8) but it produced even more errors" - last 3.9
Re: C++ requires a type specifier for all declarations
It is a G2. 3.7 and the IDE is 1.8.19
It is this sketch:
https://z-uno.z-wave.me/examples/multip ... e-sensors/
It is this sketch:
https://z-uno.z-wave.me/examples/multip ... e-sensors/
Code: Select all
// Multiple temperature sensors DS18B20
#include "ZUNO_DS18B20.h"
#define DS18B20_BUS_PIN 11 // Pin to which DS18B20 bus is connected
#define N_SENSOR 3 // Number of DS18B20 sensors
// You need to adopt ZUNO_SETUP_CHANNELS and add more getters if tou need more sensors
OneWire ow(DS18B20_BUS_PIN);
DS18B20Sensor ds18b20(&ow);
#define ADDR_SIZE 8 // Size of address of devices on 1-wire bus
byte addresses[ADDR_SIZE * N_SENSOR]; // Here we store all the scanned addresses
#define ADDR(i) (&addresses[i * ADDR_SIZE]) // Macro to simplify our life
byte number_of_sensors; // Number of sensors found
word temperature[N_SENSOR]; // Here we store temperatures
// Define Z-Wave channels. Add more if you need more sensors
ZUNO_SETUP_CHANNELS(
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp1),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp2),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp3)
);
void setup() {
number_of_sensors = ds18b20.findAllSensors(addresses);
}
void loop() {
for (byte i = 0; i < number_of_sensors && i < N_SENSOR; i++) {
// Read temperature
temperature[i] = ds18b20.getTemperature(ADDR(i)) * 100;
// Sending report
zunoSendReport(i + 1); // Channels starts from 1
}
delay(30000);
}
// Getters. Add more if you need more sensors
word getterTemp1() {
return temperature[0];
}
word getterTemp2() {
return temperature[1];
}
word getterTemp3() {
return temperature[2];
}
Re: C++ requires a type specifier for all declarations
I have this code compiled and loaded successfully.lanbrown wrote: ↑29 Aug 2022 20:18It is a G2. 3.7 and the IDE is 1.8.19
It is this sketch:
https://z-uno.z-wave.me/examples/multip ... e-sensors/
Code: Select all
// Multiple temperature sensors DS18B20 #include "ZUNO_DS18B20.h" #define DS18B20_BUS_PIN 11 // Pin to which DS18B20 bus is connected #define N_SENSOR 3 // Number of DS18B20 sensors // You need to adopt ZUNO_SETUP_CHANNELS and add more getters if tou need more sensors OneWire ow(DS18B20_BUS_PIN); DS18B20Sensor ds18b20(&ow); #define ADDR_SIZE 8 // Size of address of devices on 1-wire bus byte addresses[ADDR_SIZE * N_SENSOR]; // Here we store all the scanned addresses #define ADDR(i) (&addresses[i * ADDR_SIZE]) // Macro to simplify our life byte number_of_sensors; // Number of sensors found word temperature[N_SENSOR]; // Here we store temperatures // Define Z-Wave channels. Add more if you need more sensors ZUNO_SETUP_CHANNELS( ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp1), ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp2), ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemp3) ); void setup() { number_of_sensors = ds18b20.findAllSensors(addresses); } void loop() { for (byte i = 0; i < number_of_sensors && i < N_SENSOR; i++) { // Read temperature temperature[i] = ds18b20.getTemperature(ADDR(i)) * 100; // Sending report zunoSendReport(i + 1); // Channels starts from 1 } delay(30000); } // Getters. Add more if you need more sensors word getterTemp1() { return temperature[0]; } word getterTemp2() { return temperature[1]; } word getterTemp3() { return temperature[2]; }
Try reinstalling z-uno by uninstalling it manually first.
Re: C++ requires a type specifier for all declarations
I completely uninstalled the IDE, deleted any directories that were left, installed the IDE and the 3.7 board manager. Still the same error:
Code: Select all
Arduino: 1.8.19 (Windows Server 2016), Board: "Z-Wave>ME Z-Uno2, USA, Enabled, Normal +0dBm"
Couldn't determine program size
Needed file "C:\Users\user\AppData\Local\Temp\2\arduino_build_929741\sketch_aug26a_ino_signed.bin" doesn't exist. Build the sketch first!
An error occurred while uploading the sketch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Re: C++ requires a type specifier for all declarations
And if you try to only compile the sketch?lanbrown wrote: ↑29 Aug 2022 21:39I completely uninstalled the IDE, deleted any directories that were left, installed the IDE and the 3.7 board manager. Still the same error:Code: Select all
Arduino: 1.8.19 (Windows Server 2016), Board: "Z-Wave>ME Z-Uno2, USA, Enabled, Normal +0dBm" Couldn't determine program size Needed file "C:\Users\user\AppData\Local\Temp\2\arduino_build_929741\sketch_aug26a_ino_signed.bin" doesn't exist. Build the sketch first! An error occurred while uploading the sketch This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Arduino from windows store?
Re: C++ requires a type specifier for all declarations
If I click verify, the only error is that it cannot determine the size.
I've attached screenshots for the verify and the upload.
I've attached screenshots for the verify and the upload.
Code: Select all
Couldn't determine program size
Needed file "C:\Users\ADMINI~1\AppData\Local\Temp\2\arduino_build_929741\sketch_aug26a_ino_signed.bin" doesn't exist. Build the sketch first!
An error occurred while uploading the sketch
- Attachments
-
- Screen Shot 2022-08-30 at 12.43.16 PM.png (215.81 KiB) Viewed 2688 times
-
- Screen Shot 2022-08-30 at 12.18.35 PM.png (908.31 KiB) Viewed 2688 times
-
- Screen Shot 2022-08-30 at 12.18.15 PM.png (75.16 KiB) Viewed 2688 times