Compilation Error for Arduino Pro or Pro Mini
-
@rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:
Fix above should work (newest version, had first vo check for the correct type of data type).
I have just done your last modification I have a new error message

-
@rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:
just comment this line out (start with //int16_t). This calculation is replaced by the one in the before() section
I also put // before the line sleep (conversatuionTime);
Which gave an error message.
And now lr sketch no longer has any error.
I thank you for help, and I will try to advance now in the discovery of MY SENSORS.Daniel
-
@rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:
just comment this line out (start with //int16_t). This calculation is replaced by the one in the before() section
I also put // before the line sleep (conversatuionTime);
Which gave an error message.
And now lr sketch no longer has any error.
I thank you for help, and I will try to advance now in the discovery of MY SENSORS.Daniel
@Daniel-Ruiz
Sorry, but to make the picture complete:
the sleep() is necessary!
Please do as follows:
insertconst int conversionTime;in the line below int resolution...
revert back in before to conversionTime = 750 / (1 << (12 - resolution)); //<---added
reactivate the sleep(conversionTime) in loop() (or use wait(conversionTime) instead. -
@rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:
const int conversionTime;
J'ai modifié comme ci dessous:
il n'y plus d'érreur
-
@rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:
const int conversionTime;
J'ai modifié comme ci dessous:
il n'y plus d'érreur
@Daniel-Ruiz je parle aussi un peu de francais, mais comme ce n'est pas gentile aux autres, je continue en anglais:
This is not a a good idea to "solve" the problem like this.What is necessary is a global variable. This has to be introduced in the header of the c file (before the before() part). But as in the header no calculation is allowed, we have to do this calculation somwhere else (proposal was in the before() section. It is sufficient, to do this once, but it would also be possible to do that in loop(). If you do not want to calculate at all, you may just delete everything with "conversionTime" and do a sleep() with 750ms like that: sleep(750); this is absolutely necessary to get proper results from the DS18x20!
Further remark: If you want to go further steps with MySensors, you should try to understand the meanings of global variables, data-types, initialisation-functions like before(), presentation() and setup() and the loop(). -
I modified as follows:
There is no more errorsI thought that setting up MYSENSORS was something simple, as indicated in the presentation of the website. I thought the skits were working without changing them. I note that this is not the case, and that it is necessary to have notions of programming.
-
I modified as follows:
There is no more errorsI thought that setting up MYSENSORS was something simple, as indicated in the presentation of the website. I thought the skits were working without changing them. I note that this is not the case, and that it is necessary to have notions of programming.
@Daniel-Ruiz According to my experience, it normally is not necessary to change sketches.
Especially not as long as they are "official" MySensors Sketches. But as soon as additional libs are concerned (here: dallasTemperature), the developers may not be able to survey all external changes that may happen. (The conversionTime calculation had been "public" in the past; this had been changed for whatever reason by the dallas-lib-guys). So this sketch originally had worked. It also may have worked, if you installed an older version of the relevant lib (with the lib manager in the IDE).Nevertheless: You most likely already got a first idea how these things work. Me too, I had to fullfill a fast learning curve... BUT: It is fun!
-
@rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:
@Daniel-Ruiz According to my experience, it normally is not necessary to change sketches.
Especially not as long as they are "official" MySensors Sketches. But as soon as additional libs are concerned (here: dallasTemperature), the developers may not be able to survey all external changes that may happen. (The conversionTime calculation had been "public" in the past; this had been changed for whatever reason by the dallas-lib-guys). So this sketch originally had worked. It also may have worked, if you installed an older version of the relevant lib (with the lib manager in the IDE).
Nevertheless: You most likely already got a first idea how these things work. Me too, I had to fullfill a fast learning curve... BUT: It is fun!I fully agree with you.
I have already assimilated some notions thanks to your experience. I'm going to hang on and move on. I love learning and discovering new technologies.
I wish you a good evening.
Daniel