How to Measure a Remote Temperature Using Pico W and Arduino Manager
by Fab64 in Circuits > Microcontrollers
35 Views, 1 Favorites, 0 Comments
How to Measure a Remote Temperature Using Pico W and Arduino Manager

This Instructable will guide you through building a remote thermometer using Pico W or Pico 2W and Arduino Manager.
A few days ago, I was troubleshooting a machine that exhibited unexpected behavior. I suspected that a component was overheating, but the machine was too far from the control unit, making it impossible to measure the temperature while operating it. To solve this, I decided to build a remote thermometer.
Using a thermistor and a Raspberry Pi Pico W, I designed a system to transmit temperature readings to Arduino Manager via Bluetooth. This allowed me to monitor the component’s temperature in real time from my mobile phone while operating the machine.
Thanks to Arduino Manager’s Code Generator, building and programming the thermometer took just a few minutes.
Arduino Manager, is a powerful general purpose iOS iPadOS / watchOS / macOS App which allows to control any Arduino (or Arduino compatible) board by the means of about 40 different Widgets.
Some of the available Widgets are:
- Display Widget
- LED Widget
- Switch Widget
- Push Button Widget
- Knob Widget
- Slider Widget
- Alarm Widget
- Sound Alarm Widget
- Thermostat Widget
- Threshold Widget
- Text Widget
- and many more
Arduino Manager prioritizes your privacy, with no registration or cloud account required—only your Apple ID. However, you have the option to save your Widget Lists to iCloud, enabling seamless sharing across your devices.
For more information about Arduino Manager:
- Arduino Manager for iOS, Arduino Manager for macOS.
- Past Instructables:
- How to Control Arduino R4 WiFi From Your IPhone / Apple Watch / IPad / Mac
- Cheap IOT Device in Minutes and Without Writing Any Code Using Raspberry Pico Pi W
- Controlling ESP32 Running Micropython With Arduino Manager
- Arduino Manager: Generate Raspberry Pi Pico C/C++ Code for an AC Power Monitor – Step-by-Step Example
When the complexity of the Arduino code increases, such as when dealing with multiple analog and digital sensors to read, controlling numerous actuators, and implementing complex algorithms, the likelihood of making errors rises. Consequently, debugging the code becomes more challenging and the time and effort required to address these issues could significantly affect the progress of your project. For this reason Arduino Manager also provides (for an additional small fee):
- Code Generator: This add-on allows to generate the basic Arduino code for supporting the Widgets you need in your project.
- PIN Code Generator: Linking widgets to Arduino PINs, this add-on dramatically speeds up Arduino code development. In many cases you don't need to write a single line of code.
A nice additional feature is Voice Commands which allows to control most of the Arduino Manager Widgets by means of your voice (English only)!. See past Instructables form more.
Apple Watch is supported as well (with some limitations): you can control any Arduino board directly from your wrist, wherever you are in the world!
Arduino Manager for iOS/iPadOS is available here: App Store for $7.99 and includes the watchOS version. The macOS version is available here: App Store for $10.99 (please, note that not all the widgets are available on all the platforms).
More information, documentation, video tutorials, libraries and examples on Arduino Manager are available here:
Supplies
- Arduino Manager
- a NTC
- a resistor (see below)
- Pico W or Pico 2W
- SD Card Reader breakout board (optional)
- Power bank to power the Pico / (optional)
Measuring Temperature Using a Thermistor
A thermistor is a semiconductor device whose resistance increases or decreases with the temperature accordingly with a know equation (Steinhart–Hart equation). Therefore, knowing the thermistor resistance, its temperature can be calculated from the equation.
There are two types of thermistors: NTC (Negative Temperature Coefficient) and PTC (Positive Temperature Coefficient).
- NTC thermistors: Resistance decreases as temperature rises.
- PTC thermistors: Resistance increases as temperature rises.
For more details on thermistors, check out: Wikipedia - Thermistor.
NTCs are typically preferred for temperature measure measurement due to their relatively linear response to temperature changes.
To measure temperature using a NTC thermistor, we follow these steps:
- Measure the thermistor’s resistance (RT).
- Use the Steinhart–Hart equation to calculate the temperature from RT.
For my thermometer I used the Vishay NTCLE100E3103GT1 because I found it in my spare parts.
How to Measure the Thermistor Resistance

For resistance measurement, we’ll use a simple voltage divider circuit connected to the GP26 of the Pico (pin 31) which is one of its ADC inputs.
R1 is chosen using the Thermistor resistance @25˚C (298.15 K). This value is specified by the NTC manufacturer in the datasheet.
In my case it was: 10KΩ.
The voltage divider output voltage (Vout) is given by:
Vout = RT * 3.3V / (R1 + RT)
By measuring Vout with the Pico W ADC, the resistance RT can be calculated as:
RT = R1 * Vout / (3.3 - Vout)
How to Calculate the Temperature
To calculate the temperature from RT we should use the Steinhart–Hart equation:
1/T = 1/T0 + 1/β + ln(RT / R0)
where:
- T0 is the temperature at which the Thermistor has resistance R0
- R0 is the resistance at T0
- β is a coefficient provided by the manufacturer
For more precise calculations, Vishay provides a NTC RT Calculation Tool, which follows this refined Steinhart–Hart equation:
T=1 / (A1 + B1 * ln(RT / R25) + C1 * ln(RT / R25)^2 + D1 * ln(RT / R25)^3) - 273.15
For my NTC, the tool provided the following constant values:
- R25 = 10K
- A1 = 0.003354016
- B1 = 0.000256985
- C1 = 2.62013E-06
- D1 = 6.38309E-08
With these equations and parameters, we’re now ready to set everything up.
The Schematic

The thermometer schematic is straightforward: a voltage divider consisting of R1 and the thermistor is connected to the Pico's ADC on GP26.
In my setup, I used the Vishay NTCLE100E3103GT1 thermistor with R1 = 10KΩ. If you're using a different thermistor, be sure to adjust the R1 value and the Steinhart–Hart constants accordingly.
Optionally, you can add a SD Card reader to log the temperature data over time. We’ll cover its usage it later.
Create a New Widget List in Arduino Manager
To set everything up, follow these steps:
- Create a new Widget List in Arduino Manager.
- Add widgets to display the temperature.
- Generate a Pico W C++ project using Arduino Manager’s Code Generator.
- Modify the generated code as needed.
- Establish a new connection between the Pico W and Arduino Manager.
- Read and display the temperature.
Create a New Widget List in Arduino Manager


From the left-side menu, select Widget Lists, then click New. Enter a name for the Widget List, such as Remote Thermometer Instructable.
You can choose to store the Widget List locally on your device or on iCloud. Storing it on iCloud allows access from all your devices.
Add the Display Widgets



To add new widgets, enter Edit mode by toggling the Edit switch at the bottom of the screen. Then, tap the "+" button and select a Display Widget, and rename it by replacing "?" with "Temperature".
Next, click the Settings button and enter "°C" in the Unit of Measure field.
Add another Display Widget to display the temperature in F, name it Temperature as well. In the Unit of Measure field enter "°F".
Since the temperature in °C is converted in °F using the formula:
F = 1.8 * C + 32
enter:
- Scale: 1.8
- Constant Shift: 32
Generate the Pico W C++ Project Using Arduino Manager


To create the Pico W project, select Code Generator from the left-side menu, click New, and enter a project name such as "Remote Thermometer Instructable".
Enter the following details:
- Board: Raspberry Pi Pico W (or Raspberry Pi Pico 2 W)
- Communication Device: Built-in Bluetooth
- Language: C++
- Callbacks:
- Connection: Enabled
- Disconnection: Enabled
Next, select "Widget Pins" and choose the first Display Widget. Since the thermistor is connected to GP26, set:
- Pin: 26
- Read Value Every: 2000 (to read the temperature every 2 seconds)
- Input Preprocess Function: Enable
Finally, to generate the project, click Generate.
Configure and Run the C/C++ Project in Visual Studio Code
In this section, we assume your Visual Studio Code development environment is already set up and functioning. If not, please refer to the official documentation for setup instructions: Getting started with Raspberry Pi Pico.
- Open Visual Studio Code on your macOS or PC
- Click on Raspberry Pico Extension and select: Import Project
- Select location: iCloud Drive ⇾ Arduino Manager ⇾ Remote_Thermometer_Instructable
- Select your debugger
- Click import
- Create a folder called: lib
- Right click on the lib folder and select Open in Integrated Terminal
- Enter the following commands
- Click on Raspberry Pi Pico Extension on the left bar and select Configure CMake
- Click Compile
- Run the program: Run ⇾ Run Without Debugging (alternatively use Start Debug)
If you're not using Visual Studio Code, you can still use the generated code, but you may need to adapt the provided files to fit your development environment.
Customize the Code
The Arduino Manager's Code Generator has already set up most of the code for us, handling communication details, configuring the ADC, and setting up the required pins.
However, some customizations are still needed to get a perfectly working code responding to our needs.
In this section, we’ll make the necessary code modifications.
Locate the following comments at the beginning of the code. Any code placed between "Start your code" and "End your code" will remain unchanged, even if the Arduino Manager's Code Generator updates the project.
Change the section as follows:
A1, B1, C1, D1, and R25 are constants provided by Vishay for calculating the temperature from the thermistor’s resistance.
R is the resistance value used in the voltage divider.
Additionally, we have the following function prototypes:
- read_voltage: Reads the ADC values from the voltage divider multiple times and averages them for a more stable reading.
- calculate_rt: Computes the thermistor’s resistance based on the measured voltage.
- calculate_temperature_celsius: Calculates the temperature using the Steinhart–Hart equation.
Locate this section at the end of the code:
and change it with the body functions.
The final step is to properly call the functions.
The generated code includes a function (preprocess_display_Temperature) that is called every two seconds. Update it as shown below:
Now the code is completed and you can re-run it.
To use the thermometer away from the development computer, simply connect the Pico W to a power bank, and you're all set!
Connect to Raspberry Pico to Test the Thermometer


Now, it's time to create a new connection in Arduino Manager and connect to the thermometer.
- Open Arduino Manager and select Connections from the left-side menu.
- Click Scan to detect available devices.
- A new connection named PicoAM should appear in the list.
- From the left-side menu, select Widgets.
- Click the Wrench button in the top-right corner to open the page configuration.
- Select PicoAM as the connection and click OK.
- Click the Plug button in the bottom-left corner to connect to the Pico W. Once the connection is established, the blue LED will turn on.
- The temperature in Celsius and Fahrenheit should now appear in the two Display Widgets.
That's it! Your remote thermometer is now up and running.
Logging the Temperature Over Time


By using the thermometer remotely while operating the machine, I was able to confirm that the device had overheated, causing the erratic behavior. After replacing the device, the machine started working as expected.
My next task was to ensure that the device wouldn't overheat during extended operation. I used another feature provided by Arduino Manager: the Logged Data Graph, which displays data stored in a file on an SD card.
Here’s how you can set it up:
- Wire an SD Card reader breakout board as shown in the schematic. Some SD Card readers requires to be powered at 5V instead of 3.3V. If this is your case connect the SD Card reader power pin to Vbus (Pin 40) instead.
- In Arduino Manager, switch to Edit Mode and add a Logged Data Graph Widget. Name it "Temp Log".
- Go to the Code Generator, click on Logged Data Graphs, and select the Temp Log widget.
- Enter the following information:
- Label: Celsius
- Sampling Period: 300 (storing a reading every 5 minutes)
- Max Number of Samples: 200 (after 200 samples, the log file is overwritten)
- Preprocess Function: disabled
- Click Generate to update the project code.
- Go to the code, locate the doWork function and change as follows. The variable temperature contains the temperature reading performed every two minutes, instead the variable temp_Log_celsius is the variable used to store the data on the SD Card.
- Compile and rerun the code.
- Wait about 20 minutes to allow some readings to be stored.
- Go to Arduino Manager, connect to the thermometer, and click the refresh button on the Temp Log Graph Widget. After a few seconds, the graph should display the measured temperature over time.
Conclusions
This simple project demonstrates how Arduino Manager can effectively solve everyday problems by minimizing the time needed to write code for our microcontroller. It also provides a versatile and user-friendly interface accessible on macOS, iPhone, iPad, and even Apple Watch.