Arduino Parts #539
Replies: 4 comments
-
Posted at 2014-05-30 by DrAzzy Presently, nobody's written an Espruino driver for a PH meter. Someone will need to write the code to interface with it (hopefully as a module) - that could be you (I wrote a few of the modules, some of them only shortly after discovering microcontrollers in general - it's not particularly hard or anything, at least for cooperative hardware). Read the datasheets/specs for the modules to see how you have to interface with them - this gives you an idea of how easy it would be to write that module. If it's just an analog output, it's trivial - all you need to do is whatever mathematical manipulations the datasheet/specs tell you to. If it's I2C, the module will probably be straightforward to write. SPI is a bit harder to work with, but nothing too awful. Things that use custom digital protocols (like the DHT11) are not as agreeable. Also, things that have arduino libraries are much easier to write drivers for, because you have working driver code to crib from. Some of the modules were clearly the result of copy-pasting arduino code (probably using an editor with JS highlighting) and converting that way, rather than writing code from scratch. For what it's worth, the first result I saw on ebay ( http://www.ebay.com/itm/Analog-PH-Probe-Sensor-Shield-and-PH-Probe-Kit-For-Arduino-Compatible-/181341515761?pt=LH_DefaultDomain_0&hash=item2a38cbeff1 ) has analog output and the measuring process looks trivial. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-30 by badxhabit Hi, So I just received my pH Meter and shield from df, however, I am running into a little trouble converting the library to JS. I have taken the Arduino code from here[http://www.dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161)], but I can't seem to find an equivalent to "millis();". Is there a way around this? Am I even going in the right direction? Thanks.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-30 by @gfwilliams Hi - there is However the Arduino code keeps going around the loop and grabbing values every So for example you could try (untested!):
So whenever you want a value, that'll go away and will get 5 values (meanwhile other code can be doing other things), and it will then average them and return the result. A few things I noticed that might help:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-07-05 by d0773d @badxhabit I have had a bit of experience using ph sensors with the Espruino; however, I do not have any example code at the moment. I have used the ph sensor from http://www.atlas-scientific.com and I recently just purchased the LeoPhi from www.sparkyswidgets.com. The PH sensor from sparkyswidgets is on backorder so I haven't received it yet. Also, the ph sensor from sparkyswidgets is opensource and openhardware. I tend to navigate more towards opensource/hardware to support the the opensource movement. I will get back to you with my findings on the LeoPhi once I receive it. I would recommend that you hook up a temperature sensor to get a temperature compensated ph results. Temperature compensated ph results give more of an "accurate" reading than just a ph reading. I use the analog temp sensor from atlas-scientific with success. I also posted my temp sensor code in the forum which can be found here: http://forum.espruino.com/conversations/1572/#comment29544 When you have the time can you respond back letting us know how you like the PH sensor that you purchased? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-05-30 by badxhabit
Hey,
I'm about to finally start a project with my Espruino chip, but had a question regarding parts. I wanted to add a pH probe but all I could find are ones that are Arduino Library ready.
Will this pH probe work my Espruino chip? If not, where can I buy the Espruino specialty parts?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions