Read temperature with Arduino ATmega328P ADC with DTH11 [closed] - arduino

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have a little problem for school and I have to read the temperature with Arduino from a DTH11 sensor and print it in serial, only in C language.
Can someone help me with an example or something.

You can find the DHT11 data sheet on the Internet, for example
https://akizukidenshi.com/download/ds/aosong/DHT11.pdf
or
https://www.mouser.com/ds/2/758/DHT11-Technical-Data-Sheet-Translated-Version-1143054.pdf
there are sections which explain how the sensor module communicates via 1 wire with the MCU (Arduino).
Then, once you have an idea how the communication happens, you can read more articles like
https://howtomechatronics.com/tutorials/arduino/dht11-dht22-sensors-temperature-and-humidity-tutorial-using-arduino/
and there are many others, most use an already written library.
If your assignment won't let you use a library, you'll have to read for example the code at https://playground.arduino.cc/Main/DHTLib/ in files dht.h and dht.cpp and implement your own, maybe minimal version based on your understanding of the information provided on DHT's data sheet.
I would recommend to get things working by using a library first, then change it to work without.

Related

Data science project example [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Do anybody know about a github repo with a full well organized data science project? Preferable in Python. My hobby project often get mezzy with a mix of Python code and notesbook. A worked out project is the best way to learn some new tricks.
Data Science is regarded a bit differently by different people, so you might consider focusing on what exactly you wish to learn.
But, take a look at those:
https://github.com/bulutyazilim/awesome-datascience
https://www.kaggle.com/
The first one contains lots of relevant sources of information. The second is originally a competition site with varied different problems in ML, but also contains past competitions (and datasets). They added a cool feature called "kernels" which are just code files people publish and you could learn from those.

Is there a C code analyzer which can show usage of global variables in functions? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
right now I have a big project with legacy C/C++ source codes. There are many global variables spread in different functions. In order to analyze the code, I need a tool which can take a look into these functions, check what local/global variables are used and modified in this function, and then better show theses interfaces graphically.
Does anyone have experience with this kind of analysis and know accordingly the tool names? I've tried Understand from SciTools, but it cannot deliver this kind of report.
Thanks!

What are some high quality Standard ML code/projects to learn from? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm trying to learn to write elegant Standard ML code by reading others' code or projects. Does anyone know of some good code/projects?
I found the MLton compiler to be a great source for learning the module system.
The Twelf theorem prover also has a lot of high quality examples.
The standardml github account has a number of projects of varying quality. Somehow my sml-ext library ended up there. I'm not sure how.

Send data to a ws2801 LED strip with arduino [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
How do i send data manually (without any pre-made library) to a ws2801 led strip with a arduino?
I'm not asking for someone to write the code for me, just a push in the right direction.
i have a arduino leonardo
You use SPI, which is 3 data lines from the Arduino.
Check out this tutorial:
Tronix SPI tutorial
and then the Arduino library/tutorial:
Arduino SPI Tutorial/Library
Now check the datasheet and see what you can learn from it:
WS2801 datasheet
There are several video tutorials online about using the Arduino, check them out once you grok SPI it's really quite simple.:
The WS2801, does use a SPI type interface similar to a Shift register, you push 3 Bytes of data to populate the first chip, then keep pushing more Bytes for an overflow.
The Data Sheet shows two wire, Clock & Data; but you can also connect POL (Output polarity reversal) up to a PWM output for intensity, thus the 3-wire interface.
Look at Adafruit-WS2801-Library for additional guidance.
This is several years later, but I'd been looking into the same subject, and found some relevant information that could help the next reader.
This project by Josh Levine uses 7 WS2812B strips to display scrolling text. The strips are connected in parallel to a single Arduino board, and the code for it does not use any pre-built library.
Check out the code here. The main thing is that the timing for WS2812b is very specific, and the code uses ASM to get the timing right. More reading about the WS2812 timing here.
Additional reading: If you're interested in how the LED strips connected in parallel work, Josh has also written up an article explaining his bit-crunching technique for this, which you can read here.

Looking for network link speed determination algorithm [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm looking for the best way to interpret the standard (well, standardish) Ethernet PHY registers, to determine the speed that an Ethernet link is actually running at. (e.g. 10/100/1000 and full/half-duplex)
I daresay that this is to be found in the source of things like Linux, and I'm just off to look there now, but if anyone has a good reference I'd be interested.
What I'm interested in is if it actually linked and what it linked at, rather than the vast sea of possibilities that each end has advertised at the outset.
Thanks for the answer. It's intended as a language and platform agnostic question, because pretty much all MII/GMII Ethernet PHYs have the same basic registers. I happen to be on an embedded platform.
But I found a sensible sequence which was good enough for my restricted application by looking at various bits of Linux driver source - it's basically:
Check for link-up in basic-status (0x1)
If the link's up then check for negotiation-complete in basic status (0x1)
If the negotiation's complete then check for 1G in the 1000M-status register (0xa)
If you've not got 1G, then you've got 100M. (That's not a general rule, but it applies in this application)
Maybe this was really a hardware question rather than a software one...
To help you looking at how the Linux kernel does it: While each driver can do its own thing, there is a generic version which is supposed to be used when the chip follows the standard closely enough: Generic Media Independent Interface device support.

Resources