I'm trying to duplicate Mohit Bhoite's project (Satellite 2202) but I'm having trouble verifying the sketch. I'm getting the following error: "setup_watchdog was not declared". Any help would be appreciated.
Post all the code in code tags, as well as any serial output, also in code tags. Take a picture of a labelled hand-drawn wiring diagram as well and post it.
I have deleted your other cross-posts @hector157.
Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.
Repeated cross-posting can result in a suspension from the forum.
In the future, please only create one topic for each distinct subject matter. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.
I did download the zip from A solar powered temperature and humidity monitor using ATtiny85 microcontroller and SHT31 sensor. Displayed on a four digit LCD · GitHub.
Created a new sketch in the IDE and copied the content of attiny85-satellite-lcd.cpp to the sketch and copied the two cdm4101 files to the sketch directory.
Got one compiler error related to #include <cdm4101.h>, changed it to #include "cdm4101.h" because the "library" is in the sketch directory and the sketch compiled.
Next time please provide the link so we don't have to hunt for it and possibly find the wrong one.
error: 'setup_watchdog' was not declared in this scope setup_watchdog(9); //Setup watchdog to go off after 8sec
This is what your sketch directory must be. yourSketch is the sketch directory.
+---yourSketch
| yourSketch.ino
| cdm4101.cpp
| cdm4101.h
If you still have attiny85-satellite-lcd.cpp
- Rename it to
attiny85-satellite-lcd.ino - The sketch directory must also be
attiny85-satellite-lcd. - The reason for your problem is in that case that the IDE does not apply "special treatment" to the cpp file. Special treatments are only applied to the main ino file.
GREETINGS
The change you suggested worked correctly. The first part compiles fine. But when I add the other file (LCD & cm4101) according to the required code (Satellite-2202 – MOHIT BHOITE), I get other errors. I don't know what I'm doing wrong. Once again, thanks for all you help.
Thanks,
Héctor Ruiz
(.text+0x0): multiple definition of `CDM4101::DispDec(short)'
Attached a zip of the sketch that compiles for me; although it should be safe please run a virus scanner over it.
1375192.org.zip (3.5 KB)
The only change (if I recall correctly) is the earlier mentioned #include (see post #4).
Greetings
The file (1375192.org) works correctly. I understand (rookie on board) that the libraries (SHT31 & CDM4101) are installed correctly. Now it's a matter of programming the attiny85.
*I bought a Tiny AVR Programmer, but it's a pain. I'm going to buy an Arduino UNO and see how it goes.
*** Thank you for the support you gave me in this matter.**
I forgot that I did install the SHT31 library. The CDM4101 can be considered a library but it's local to the sketch so not really a library but part of the sketch.
Enjoy the building.
OK, as I understand the sketche it's ready for Burn Bootloader?
Thanks, I really appreciate all your help.
No idea about that. Burn boot loader will not burn the sketch.
True, I expressed it wrong. My question is, its Ready to program the Attiny85?
If your ATtiny85 is a new IC and if you compiled the sketch for the ATtiny with internal 8MHz clock you should be able to get it working.
I'm not that familiar with the ATtiny85. There is unfortunately no complete instruction (github or Satellite-2202 – MOHIT BHOITE) for the programming.
Hello Sterretje
The project are complet and functional. THANK for all you help an dthis mater. Oner more question. The LCD displays a zero instead of the degree sign, so it looks like 770 instead of 77°. How can I correct this?
I unfortunately don't know; mostly because I'm not familiar with the CDM4101.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.