Skip to content

Commit 5591c72

Browse files
committed
Version 2 updates
1 parent f81c8e4 commit 5591c72

File tree

9 files changed

+51
-92
lines changed

9 files changed

+51
-92
lines changed

README.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ Add the ability to measure ORP to your hardware application with a fully digital
88
#### Summary ℹ️
99

1010
* mV range of -2.23 to 2.23
11-
* Accuracy ±0.001 mV
12-
* Resolution 0.001 mV units
13-
* I²C, UART, and USB interfaces
14-
* 1-Wire interface for DS18B20 temperature sensor
11+
* Accuracy ±0.1 mV
12+
* Resolution 0.1 mV units
13+
* I²C interface
1514
* 25x15 mm for castellated or DIP mounting
1615
* Single point calibration
1716

@@ -32,22 +31,14 @@ Adding a module to your own design is straightforward. You'll need:
3231
2. clean, preferably isolated, power supply
3332
3. probe connection (U.FL, BNC, terminal block)
3433

35-
Some resources to get started:
36-
37-
* [Schematic of the Isolated Dev Board](https://ufire.co/files/isolated_qwiic_dev_board_schematic.pdf)
38-
* Design Incorporation section of the [Datasheet](https://docs.google.com/document/d/1nhQdt0k4pQb8jUJF8Eyrj9TyxYFNImvvaVTNkO53OXs/export?format=pdf)
39-
40-
> [Request a custom board](https://docs.google.com/forms/d/e/1FAIpQLSfiCyjnq35GVyaRjVw6HphhNFNmoyi723qlqVLjUhc-TrmvfQ/viewform)
41-
4234
* * *
4335

44-
#### Ask a question 🤙
36+
### Ask a question 🤙
4537

46-
* [Support Request](https://docs.google.com/forms/d/e/1FAIpQLSekGsS88VkVGCOdW58-MLXKEMpZ8m3PTjGt28sdiWZpEqDXPg/viewform)
4738
* [Discord](https://discord.gg/rAnZPdW)
39+
* [questions@microfire.co](mailto:questions@microfire.co)
4840

4941
* * *
50-
### Buy One
51-
[Mod-ORP](https://ufire.co/buy/)
5242

53-
[Isolated Dev Board](https://ufire.co/buy/) - all the components needed to use the module
43+
### Website
44+
[microfire.co](https://microfire.co)

examples/Basic/Basic.ino

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
/*!
2-
ufire.dev for links to documentation, examples, and libraries
2+
microfire.co for links to documentation, examples, and libraries
33
github.com/u-fire for feature requests, bug reports, and questions
44
questions@ufire.co to get in touch with someone
55
6-
Mod-ORP hardware version 1, firmware 1
6+
Mod-ORP hardware version 2, firmware 1
77
*/
88

9-
#include <uFire_Mod-ORP.h>
10-
uFire::Mod_ORP::i2c orp;
9+
#include <Microfire_Mod-ORP.h>
10+
Microfire::Mod_ORP::i2c orp;
1111

1212
void setup()
1313
{
14+
// start Serial and I2C
1415
Serial.begin(9600);
1516
Wire.begin();
1617

17-
// start the sensor after Wire.begin()
18+
// start the sensor
1819
orp.begin();
1920
}
2021

examples/ErrorHandling/ErrorHandling.ino

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*!
2-
ufire.dev for links to documentation, examples, and libraries
2+
microfire.co for links to documentation, examples, and libraries
33
github.com/u-fire for feature requests, bug reports, and questions
44
questions@ufire.co to get in touch with someone
55
6-
Mod-ORP hardware version 1, firmware 1
6+
Mod-ORP hardware version 2, firmware 1
77
*/
88

9-
#include <uFire_Mod-ORP.h>
10-
uFire::Mod_ORP::i2c orp;
9+
#include <Microfire_Mod-ORP.h>
10+
Microfire::Mod_ORP::i2c orp;
1111

1212
void setup()
1313
{
@@ -23,21 +23,6 @@ void setup()
2323

2424
void loop()
2525
{
26-
// get the temperature of the solution
27-
orp.measureTemp();
28-
29-
// check for errors
30-
if (orp.status)
31-
{
32-
Serial.println("Error:");
33-
switch (orp.status)
34-
{
35-
case orp.STATUS_SYSTEM_ERROR:
36-
Serial.println(" temperature sensor not connected");
37-
break;
38-
}
39-
}
40-
4126
// take a pH measurement
4227
orp.measureORP();
4328
switch (orp.status)
@@ -46,9 +31,8 @@ void loop()
4631
Serial.println(" Error: Module not functioning properly");
4732
break;
4833
case orp.STATUS_NO_ERROR:
49-
Serial.print(orp.mV, 3);
34+
Serial.print(orp.mV);
5035
Serial.println((String)" mV @ " + orp.tempC + "°C");
51-
Serial.println();
5236
break;
5337
}
5438

examples/Shell/Shell.ino

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
/*
2+
microfire.co for links to documentation, examples, and libraries
3+
github.com/u-fire for feature requests, bug reports, and questions
4+
questions@ufire.co to get in touch with someone
5+
6+
Mod-ORP hardware version 2, firmware 1
7+
28
This allows you to run various functions in a command-line like interface.
39
Enter:
410
`config` to see the configuration of the device.
511
'reset' to reset all the configuration stored in the device
6-
712
Measure ORP:
813
`orp`
9-
1014
Single Point Calibration:
11-
sin <calibration solution in pH> <solution temp [25]>
12-
`sin 60.0 t` - Calibrate at 600.0 mV
13-
15+
sin <calibration solution in mV>
16+
`sin 600` - Calibrate at 600.0 mV
1417
Measure Temperature:
1518
temp
16-
1719
Change the I2C address:
1820
i2c 0x0F
1921
*/
2022

2123
#include <Arduino.h>
2224
#include <Wire.h>
23-
#include "uFire_Mod-ORP.h"
25+
#include "Microfire_Mod-ORP.h"
2426

25-
uFire::Mod_ORP::i2c orp;
27+
Microfire::Mod_ORP::i2c orp;
2628

2729
String buffer, cmd, p1, p2;
2830
const int fw_compatible = 1;
29-
const int hw_compatible = 1;
31+
const int hw_compatible = 2;
3032

3133
void config()
3234
{
3335
orp.getDeviceInfo();
34-
Serial.println((String) "uFire Mod-ORP Sensor: " + (orp.connected() ? "connected" : "*disconnected*"));
36+
Serial.println((String) "Microfire Mod-ORP Sensor: " + (orp.connected() ? "connected" : "*disconnected*"));
3537
if (!orp.connected()) return;
3638
if ((orp.fwVersion != fw_compatible) || (orp.hwVersion != hw_compatible))
3739
{
@@ -52,23 +54,6 @@ void config_reset()
5254
config();
5355
}
5456

55-
void temperature()
56-
{
57-
orp.measureTemp();
58-
switch (orp.status)
59-
{
60-
case orp.STATUS_SYSTEM_ERROR:
61-
Serial.println("Error: no temperature sensor connected");
62-
break;
63-
case orp.STATUS_NO_ERROR:
64-
Serial.print("C|F: ");
65-
Serial.print(orp.tempC);
66-
Serial.print(" | ");
67-
Serial.println(orp.tempF);
68-
break;
69-
}
70-
}
71-
7257
void i2c()
7358
{
7459
uint8_t i2c_address;
@@ -104,7 +89,7 @@ void measure_orp()
10489
Serial.println("Error: Module not functioning properly");
10590
break;
10691
case orp.STATUS_NO_ERROR:
107-
Serial.print(orp.mV, 3);
92+
Serial.print(orp.mV);
10893
Serial.println((String)" mV");
10994
break;
11095
}
@@ -128,20 +113,18 @@ void single()
128113

129114
void help()
130115
{
131-
Serial.println(F("List of available commands, parameters separated by spaces, `low 4.0 22.1`, bracketed numbers are defaults if none provided"));
116+
Serial.println(F("List of available commands, parameters separated by spaces"));
132117
Serial.println(F("config -or- c : no parameters : Displays all configuration and system information."));
133118
Serial.println(F("orp : no parameters : Starts an ORP measurement."));
134119
Serial.println(F("i2c : I2C_address : Changes the module's I2C address."));
135120
Serial.println(F("reset -or- r : no parameters : Returns all configuration information to default values."));
136121
Serial.println(F("sin : calibration_mV : Single-point calibration."));
137-
Serial.println(F("temp -or- t : no parameters : Starts a temperature measurement"));
138122
}
139123

140124
void cmd_run()
141125
{
142126
if ((cmd == "conf") || (cmd == "config") || (cmd == "c")) config();
143127
if ((cmd == "reset") || (cmd == "r")) config_reset();
144-
if ((cmd == "temp") || (cmd == "t")) temperature();
145128
if (cmd == "sin") single();
146129
if (cmd == "i2c") i2c();
147130
if (cmd == "orp") measure_orp();

keywords.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ connected KEYWORD2
1515
calibrateSingle KEYWORD2
1616
getDeviceInfo KEYWORD2
1717
measureORP KEYWORD2
18-
measureTemp KEYWORD2
1918
reset KEYWORD2
2019
setDeviceInfo KEYWORD2
2120
setI2CAddress KEYWORD2

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
{
1111
"name": "Microfire LLC",
1212
"email": "contact@ufire.co",
13-
"url": "https://ufire.co",
13+
"url": "https://microfire.co",
1414
"maintainer": true
1515
}
1616
],
17-
"version": "1.0.0",
17+
"version": "2.0.0",
1818
"frameworks": "arduino",
1919
"platforms": "*"
2020
}

library.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=Microfire_Mod-ORP
2-
version=1.0.0
2+
version=2.0.0
33
author=Microfire LLC
4-
maintainer=contact@ufire.co
4+
maintainer=contact@microfire.co
55
sentence=Add the ability to measure ORP to your hardware application with a fully digital interface.
6-
paragraph=I2C, UART, and USB interfaces, mV range of -2.23 to 2.23, Accuracy ±0.001 mV, Resolution 0.001 mV units
6+
paragraph=I2C interface, mV range of -2.23 to 2.23, Accuracy ±0.1 mV, Resolution 0.1 mV units
77
category=Sensors
8-
url=https://ufire.co
8+
url=https://microfire.co
99
architectures=*
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#include "uFire_Mod-ORP.h"
1+
#include "Microfire_Mod-ORP.h"
22

3-
float uFire::Mod_ORP::i2c::_tempC = -1;
4-
float uFire::Mod_ORP::i2c::_tempF = -1;
5-
float uFire::Mod_ORP::i2c::_mV = -1;
6-
float uFire::Mod_ORP::i2c::_calibrationSingleOffset = -1;
7-
int uFire::Mod_ORP::i2c::_hwVersion = -1;
8-
int uFire::Mod_ORP::i2c::_fwVersion = -1;
9-
int uFire::Mod_ORP::i2c::_status = -1;
3+
float Microfire::Mod_ORP::i2c::_tempC = -1;
4+
float Microfire::Mod_ORP::i2c::_tempF = -1;
5+
float Microfire::Mod_ORP::i2c::_mV = -1;
6+
float Microfire::Mod_ORP::i2c::_calibrationSingleOffset = -1;
7+
int Microfire::Mod_ORP::i2c::_hwVersion = -1;
8+
int Microfire::Mod_ORP::i2c::_fwVersion = -1;
9+
int Microfire::Mod_ORP::i2c::_status = -1;
1010

11-
namespace uFire
11+
namespace Microfire
1212
{
1313
namespace Mod_ORP
1414
{
@@ -122,7 +122,8 @@ namespace uFire
122122
_tempC = _read_4_bytes(TEMP_C_REGISTER);
123123
if (_tempC == -127.0)
124124
{
125-
_tempF = -127;
125+
_tempF = 0;
126+
_tempC = 0;
126127
}
127128
else
128129
{
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define TEMP_C_REGISTER 8 /*!< temperature in C register */
2323
#define CALIBRATE_SINGLE_OFFSET_REGISTER 12 /*!< single-point calibration register */
2424

25-
namespace uFire
25+
namespace Microfire
2626
{
2727
namespace Mod_ORP
2828
{
@@ -73,5 +73,5 @@ namespace uFire
7373
uint8_t _read_byte(uint8_t reg);
7474
};
7575
} // namespace Mod_ORP
76-
} // namespace uFire
76+
} // namespace Microfire
7777
#endif // ifndef Mod_ORP_H

0 commit comments

Comments
 (0)