Questions tagged [temperature]

A simple definition of temperature is that it is a measure of heat dissipation, This tag can include programming related questions like temperature conversion, temperature detection through device sensors etc.

The temperature of a device is a quantitative measure which indicates how hot or cold the device is, temperature sensitive sensors can be used to make an alarming signal and can be programmed in various programming languages. It is measured by detection of heat radiation by a temperature sensing material, which may be then calibrated in any of various temperature scales, Celsius, Fahrenheit, Kelvin, etc.

Usage of Tag temperature

The tag temperature on stackoverflow can be used to ask questions related to programming a device or application, to sense temperature of a room/device. Tag temperature should be only used for questions related to programming, Please do not ask here questions related to physics or thermodynamics.

624 questions
1
vote
1 answer

Using assembly to convert the temperature from Celsius into Fahrenheit, and back again

I am using the following x86 assembly instructions to convert from degrees Celsius into degrees Fahrenheit: imul dword [NINE] idiv dword [FIVE] add eax, 32 For rather a lot of inputs this produces an off-by-one error: 1 °C produces 33 °F,…
Sep Roland
  • 33,889
  • 7
  • 43
  • 76
1
vote
1 answer

How can I corrrect the following formula so I'll read the acurrate temperature?

Currently I'm working with a MSP-EXP430F5529LP microcontroller and a LM35, because I need to built a thermometer. The results will show on a seven segment, 4 digit display. I'm using the following conversion, in order to show the temperature in…
1
vote
4 answers

Hello this is a simple program in C++. It calculates the temperature from Fahrenheit, Parenthesis Math Result Error

When I wrap 5/9 in parenthesis, the result is 0, but when I don't put in the parenthesis, the result is correct. Why is this? #include int main() { double temperature_farenheit = 195; std::cout << "Enter the temperature in…
1
vote
0 answers

Raspberry Pi Pico W 2022 - DHT11 Sensor Returning -1 for both Temp and Humidity

I am currently working on a Raspberry Pi Pico W project where I need to use the DHT11 sensor to return humidity and temperature however the results are returning -1 for both the temperature and humidity. I've included a picture of the circuit as…
1
vote
2 answers

Change temperature display color with a toggle switch and a range slider/JavaScript/React/CodePen

I tried to change a display color from Blue to Orange when the temperature > 30'C or > 86'F by using a toggle switch and a range slider. the toggle switch is working ok, but the range slider doesn't work correctly. For example, When move the range…
camper101
  • 11
  • 2
1
vote
1 answer

split monthly values into daily using pandas for a range of years

Hello. I need to obtain daily data for a range of years, I only have one here. But I have a problem to copy the daily values of one year, for the rest of the range. How can I do this with pandas? ETPc.index=pd.to_datetime(ETPc.index,…
1
vote
1 answer

MSAcpi_ThermalZoneTemperature won't refresh

I want to read temperature sensors from my motherboard in PowerShell 5.1. Unfortunately the corresponding WMI-object won't fetch new values if I call it more than once. Even restarting PowerShell won't help. The only way to get new data is to reboot…
GuidoT
  • 280
  • 1
  • 12
1
vote
0 answers

converting celsius to fahrenheit python

I need to have an input where the user writes the temperature in either celsius or fahrenheit, and it will convert it to the opposite one. I cant figure out why it's not working (there is no output at all) this is my code: (forgive me for bad…
1
vote
2 answers

What is the difference between temperature sensor characteristic vs. sensor calibration

I'm configuring the internal temperature sensor of a STM32F4 MCU, and when reading the documentation, I came across some "duplicated" but divergent definitions. Take a look in the image below: The temperature sensor is connected to the ADC1,…
1
vote
0 answers

Optimize for a target value at specific position inside a 2D array

I have been trying to find a method to optimize a function that gives me a 2D-array for a temperature field such that the value at a specific position within that array corresponds to a target…
mango091
  • 11
  • 3
1
vote
2 answers

How to plot average temperature and variation?

I have hourly temperature data from 1970 to 2021. I would like to summarize the dataset into a graph in ggplot showing the mean temperature of each month and year. And I also want to show the average temperature and temperature volatility increased.…
Jimin Eom
  • 9
  • 3
1
vote
2 answers

Display time of specific location

I've been able to pull temperatures of a specific city using the WorldTimeAPI: jQuery.getJSON("https://api.openweathermap.org/data/2.5/weather?q=Rome&units=metric&appid=ab85ba57bbbb423fb62bfb8201126ede", function(data) { console.log(data); var temp…
1
vote
3 answers

On calculating temperature differences between zipcodes

Prop A. I wrote a zipcode server that gives me 32,000 zip codes of USA. Each zipcode has an associated lat-long. Given 2 zipcodes, I can find the distance between them using their lat-longs. Prop B. I also wrote a weather server where you can input…
dybydx
1
vote
1 answer

Calculating monthly averages of daily temperature data including negative and positive values

I am trying to calculate monthly average temperatures for a dataset with daily temperature values that spans three years. With the data.frame appearing like this example" Date Month Temperature 12-2-2016 December -10 …
JackWassik
  • 65
  • 6
1
vote
0 answers

How can I on old VB6 get real temperature of CPU and GPU? Without WMI

I've only seen examples for VB.NET. But I need to do this on VB6. Does anyone have examples or can do this? How can I see temperature of CPU using VB.NET with Open Hardware Monitor DLL Can someone edit the code from VB.NET in VB6? I realized that…
Alex
  • 11
  • 1