I want to use the Stone touch screen with Arduino UNO to do a weather station project, I saw the article on the web is done by using ESP32, I want to change the code of ESP32 to the code of Arduino, but I changed half of it and found it is not complete, although the basic functions are written out but the code inside the setup is not given.
I am now hesitant what code should be written in setup? I have written a baud rate myself.
This is the code I wrote halfway through.
Arduino:1.8.13 (Windows 7), Development Boards:"Arduino Uno"
C:\Users\Stone-6\AppData\Local\Temp\ccRJNuOI.ltrans0.ltrans.o: In function `loop':
E:\weather1/weather1.ino:36: undefined reference to `dht::read(int)'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error while compiling for development board Arduino Uno.
Because of the Arduino ide development, we must install “dhtnew.h” library to use this module.
which is a different library.
All in all it would be helpful if you could more post more information about you and your project
You are working on an informatic project and what is most needed in an informatic project is information imagine: do the other users here in the forum have a clear picture of what you are trying to do?
To speed up finishing your project you should invest some time into writing additional information I'm 100% sure that this WILL speed up finishing your project.
So please go through this checklist and if you find an item you haven't posted yet post it
did you write which exact type of microcontroller you are using?
description of your programming skills and knowledge
description of your knowledge about electronics
description of the functionality you want to have written in normal works avoiding programming terms
do you have an oscilloscope? Yes / No
do you have a digital multimeter (DMM) Yes / No)
your age
did you post your complete sketch?
if relevant did you post a link to a datasheet of each component you are using?
if relevant did you post a handdrawn schematic or your wiring?
if you got a compiler-error. Did you post the complete compiler-output into a code-section?
If you don't post all this information because you want a "quick answer" to your detail problem It is very likely to turn out that all that happens is having mutliple waiting-times with mutliple asking back for details until the other users do have a clear picture of what you want to do.
I'm a newbie, I don't know much about programming yet, I learned a little bit of C and I'm still learning it too.
I used to study electronics, such as circuits or something, but I don't remember much about it now.
I want to read the data from the temperature and humidity sensor and the light sensor when I tap "Start" on the touch screen, and display the data in the data variable box when I tap "Stop".
I have an oscilloscope as well as a multimeter.
I'm 34 years old.
I only have a simple schematic that I drew myself.
This is a project we developed together, my development partner is hospitalized due to a virus, and I am very embarrassed to continue this topic in this way, because I can't develop the project by myself now because of my partner's departure. I hope to finish it soon before he gets out of the hospital and inspire him to be hopeful for our small team.
In this forum the highly prefered schematic-drawings are hand-drawn
anything other than hand-drawn is just a waiste of time or even worse to read.
So please post a hand-drawn picture of the wiring.
Most libraries need a initialisation through a function-call in setup begin() or init()
so please look-up the demo-codes to see what kind of initialisation is needed.
always
post the current version of your code as the
complete sketch
There is an automatic function for doing this in the Arduino-IDE
just three steps
press Ctrl-T for autoformatting your code
do a rightclick with the mouse and choose "copy for forum"
paste clipboard into write-window of a posting
and post the serial output that you receive.
As an additional remark:
I got the impression that there is a user out there with a lot of changing names that does what I call low-level trolling
beeing short on information
jumping from aspect to aspect
showing almost no progress in own effort and learning
To distinguish between such trolling and real questions I have decided to only give support if someone is able to fully implement the requests and instructions I give. That is a tough requirement. Now questions and answers in this forum are completely voluntary. As a questioner you can also say "No, I don't want that". You can freely choose whether you want to follow this requirement or not.
Another instruction from me is: If you ever have a question about anything I requested you must do a try on your own, describe this try and then ask a specific question.
So it is up to you to give full answers or not.
you could make your code more readable by using selfexplaining constants instead of hardcoded numbers with comments. The self-explaining names will make the comment obsolete.