Difference between revisions of "Component: Temperature (DS1822) (Environmental)"
From Flowcode Help
Jump to navigationJump to searchLine 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 32: | Line 34: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 171: | Line 175: | ||
|- | |- | ||
| colspan="2" | Link to the one wire component to host the bus. | | colspan="2" | Link to the one wire component to host the bus. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Sensor Settings | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | CRC Checking | ||
+ | |- | ||
+ | | colspan="2" | Allows the data to be checked before being returned. Useful if the comunication with the sensor cannot be guarenteed. GetTemperature will return 999.9 if the CRC is not a match. | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
Line 196: | Line 209: | ||
|- | |- | ||
| colspan="2" | The maximum resolution steps that the temperature can be read in. | | colspan="2" | The maximum resolution steps that the temperature can be read in. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Simulate Comms | ||
+ | |- | ||
+ | | colspan="2" | No - We use the panel GUI to perform the simulation. Yes - We use OneWire comms via an API to communicate with real hardware. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Panel Simulation | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
Line 206: | Line 232: | ||
|- | |- | ||
| colspan="2" | Serial number for simulated one wire device | | colspan="2" | Serial number for simulated one wire device | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 17:23, 9 November 2022
Author | MatrixTSL |
Version | 1.0 |
Category | Environmental |
Contents
Temperature (DS1822) component
A rugged temperature sensor allowing one or more sensors to be addressed and read. Capable of reading temperatures from -55 to +125 degrees C. Requires a One Wire component to perform the bus operations.
Component Pack
FREE
Detailed description
No detailed description exists yet for this component
Examples
This example shows how to connect the DS1822 component to the OneWire component and either select a specific device on the bus or scan through the devices on the bus collecting the temperature readings.
The temperature and serial number is output using a UART connection as is onboard a Arduino or ESP32 device.
Downloadable macro reference
![]() |
GetSerialString |
Gets the Serial String for the current addressed device. | |
![]() |
Return |
![]() |
AddressNextDevice |
Scans for the next connected device with a matching family code. Goes through the device list generated by the ScanBus macro. | |
![]() |
Return |
![]() |
GetTemperature |
Reads the temperature from the last sample on the selected device. The selected device is set using the AddressNext or AddressSpecific macros. | |
![]() |
Return |
![]() |
Initialise |
Configures each matching sensor on the bus with the specified conversion bits. | |
![]() |
Return |