Reading Maverick Meat probes

Hello, Is it possible to read Maverick Meat probes with code something like this and upload it to Cayenne and view it on the Cayenne IOS app?

Thanks.

 //************************************************************************
//ARDUINO ET-73 MEAT & PIT PROBE LIBRARY 
//By: Skye Perry
//Version 1.0.2  Last Modified: 2016-03-02
//This Library is licensed under a GPLv3 License
//Tested with Maverick Smoker Probes for the ET73. PN: PR-004(smoker probe) & PR-005(meat probe)
//************************************************************************

#ifndef ET73_h
#define ET73_h
#define LIBRARY_VERSION 1.1.1

#if ARDUINO >= 100
 #include "Arduino.h"
#else
 #include "WProgram.h"
#endif

class ET73 {
    private:
      //Constants for the ET-73 and Wiring Schematic            
      const  long double STEINHART_HART_COEF_A = 2.3067434E-4;
      const  long double STEINHART_HART_COEF_B = 2.3696596E-4;
      const  long double STEINHART_HART_COEF_C = 1.2636414E-7;
      const int RESISTOR_VALUE = 22000;

      //Samples and time Attributes
      int PIN;
      int num_samples;
      int sample_interval;
      int timenow;
      int timelastreading;
      bool serial_debug;

      //Private Methods
      bool shouldWeSample(int, int);
      float getAverageReading();

    public:
      //Constructor      
      ET73(int mypin, int mynumsamples = 10, int mysampleinterval = 10,bool debug = false); //Optional arguments must only be defined in the header or prototype
      
      //Public Methods
      float getTemp_F();
      float getTemp_C();
      float getTemp_K();
      void setNumOfSamples(int);
      void setSampleInterval(int);
};

#endif

Definitely. You can display any data from Arduino to Cayenne :slight_smile:

~B

Ok, what would the code need to look like to add in the wifi and Cayenne connections?

Do you have any code that is currently working to read the device?

Yes, The code in the first post works very well. It reads the probe and sends the reading out the serial monitor on the Arduino.
Thanks.
//************************************************************************
//ARDUINO ET-73 MEAT & PIT PROBE LIBRARY
//By: Skye Perry
//Version 1.0.2 Last Modified: 2016-03-02
//This Library is licensed under a GPLv3 License
//Tested with Maverick Smoker Probes for the ET73. PN: PR-004(smoker probe) & PR-005(meat probe)
//************************************************************************

#ifndef ET73_h
#define ET73_h
#define LIBRARY_VERSION 1.1.1

#if ARDUINO >= 100
#include ā€œArduino.hā€
#else
#include ā€œWProgram.hā€
#endif

class ET73 {
private:
//Constants for the ET-73 and Wiring Schematic
const long double STEINHART_HART_COEF_A = 2.3067434E-4;
const long double STEINHART_HART_COEF_B = 2.3696596E-4;
const long double STEINHART_HART_COEF_C = 1.2636414E-7;
const int RESISTOR_VALUE = 22000;

  //Samples and time Attributes
  int PIN;
  int num_samples;
  int sample_interval;
  int timenow;
  int timelastreading;
  bool serial_debug;

  //Private Methods
  bool shouldWeSample(int, int);
  float getAverageReading();

public:
  //Constructor      
  ET73(int mypin, int mynumsamples = 10, int mysampleinterval = 10,bool debug = false); //Optional arguments must only be defined in the header or prototype
  
  //Public Methods
  float getTemp_F();
  float getTemp_C();
  float getTemp_K();
  void setNumOfSamples(int);
  void setSampleInterval(int);

};

#endif

Is there code missing here? I might be reading it improperly but Iā€™m missing where it writes to the serial monitor.

Regardless, ultimately what youā€™re going to want to do is to replace (or supplement) the statements which print the desired data to the Serial Monitor with virtualWrite() statements that instead push that data to Cayenne. This documentation will walk you through the basics of using virtual pins and combining sketch files.

Have you connected your Arduino to Cayenne yet, even as just a blank device without uploading this probe data? If not Iā€™d step back and focus on that first, using this intro documentation. Then when your device is connected you can move to combining the connectivity sketch with your probe sketch and adding some virtualWrite() statements to populate widgets you can create on your dashboard.

If you need some help with it Iā€™d be happy to assist.

Ok, Sorry Iā€™m thinking this is what the code is,

#include <ET73.h> // First we must include the ET73 Library found here
 
 #define MEAT_PROBE_PIN 2 //Now we define which analog pin we're going to read our probe from
 
 // Now we define an ET73 probe called meatProbe, and pass it the pin as the first argument, the rest of the arguments are optional
 // ET73( int probe pin, int Number of samples (optional, default:10) ,  int sample interval in ms (optional, default:10) , bool debug (optional, default:false) )
 ET73 meatProbe(MEAT_PROBE_PIN);  
 
 
 void setup() {
   Serial.begin(9600); //Start the Serial for testing purposes  
 }
 
 void loop() { 
   //When we call the meat probe getTemp_F method, by default the library takes 24 readings at a 10ms interval 
   float myTemp = meatProbe.getTemp_F();   
 
   //Print out our results to the serial monitor
   Serial.print("Temp: ");
   Serial.print(myTemp);
   Serial.print(" F\n");   
 
   //If we want to change the number of samples we're taking for each time we call the getTemp_*(),
   //we can change it by calling the setNumOfSamples() method
   meatProbe.setNumOfSamples(20); //Here we've set the probe to take the average of 20 samples each reading
 
   //If we want to change the interval between each sample reading when we call getTemp_*(),
   //we can change it by calling the setSampleInterval() method
   meatProbe.setSampleInterval(200); //Here we've set it to take a sample every 200 ms
 
   //Now when we call out getTemp_*() method we're going to take the average of 20 samples at a 200ms interval
   myTemp = meatProbe.getTemp_F();  
   
   //Print out our results to the serial monitor and notice how it slows down.
   Serial.print("Temp: ");
   Serial.print(myTemp);
   Serial.print(" F\n");  
   
 }

Thanks.

Yep, there we go. That looks better. I think the other one you posted was the library. Iā€™ll take a better look at it and post some suggestions later.

Ok, Great. I know Ive asked this before. Is there away to make the Raspberry Pi use the MAX31855 Breakout and a driver like this I found tonight GitHub - Tuckie/max31855: Raspberry Pi driver for MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter to read and send temperature info to Cayenne for monitoring on the mobile IOS app etc with possible alerts? I think this would be very useful for people with home brewing, smoking meats, grills, oven monitoring anything that the DS18B20 canā€™t handle. The Pi would be a less costly device than the Arduino Yun Etc. Just a thought Thanks.

To address this last question, if you have the Pi/Breakout functioning outside the context of Cayenne (printing the temperature issue to your Pi command line) then you can connect your Pi to Cayenne as a MQTT/ā€œBring Your Own Thingā€ device and use that to send/receive data to your dashboard and take advantage of Cayenne features like alerts/scheduling.

Where Iā€™d start is to connect your Pi using the Cayenne MQTT Python library using one of the example sketches there. In the example sketches, you can see that we have some fake data being generated and published to Cayenne to show you what the process looks like, in statements like this:

client.celsiusWrite(1, i)
client.luxWrite(2, i*10)
client.hectoPascalWrite(3, i+800)

You can then replace those fake data statements with the ones that are printing data to your command line, modified to publish to Cayenne. You might need do to a little manipulation on the output data in python in order to get it in a format that Cayenne can accept ā€“ I can certainly help with that if you show me some examples of what youā€™re getting on the command line.

I think this should work, let me know! Youā€™ll have to set up a virtual pin on V1 on your dashboard and replace the token with your token.

#include <ET73.h> // First we must include the ET73 Library found here
#define MEAT_PROBE_PIN 2 //Now we define which analog pin we're going to read our probe from
#include <CayenneEthernet.h>
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#define VIRTUAL_PIN V1

// Now we define an ET73 probe called meatProbe, and pass it the pin as the first argument, the rest of the arguments are optional
// ET73( int probe pin, int Number of samples (optional, default:10) ,  int sample interval in ms (optional, default:10) , bool debug (optional, default:false) )
ET73 meatProbe(MEAT_PROBE_PIN);  

char token[] = "yourtoken";

void setup() {
  Serial.begin(9600); //Start the Serial for testing purposes  
  Cayenne.begin(token);
}

void loop() { 
  Cayenne.run();
}

CAYENNE_OUT(VIRTUAL_PIN){
  //When we call the meat probe getTemp_F method, by default the library takes 24 readings at a 10ms interval 
  float myTemp = meatProbe.getTemp_F();   
  
  //Print out our results to the serial monitor
  Serial.print("Temp: ");
  Serial.print(myTemp);
  Serial.print(" F\n");   
  
  Cayenne.fahrenheitWrite(VIRTUAL_PIN, myTemp);
}

All I can say is WOW! Thanks a lot this is awesome. I had an unused Arduino Ethernet 2 Shield laying around so I just had to change the library. I have not tested at high temps but its right on with the room temp sensor I have. Next step maybe WiFi but it seems Arduinoā€™s wireless options are dwindling down. Any suggestions or do any of the WiFi shields from other companies work with Cayenne?

adam Leader
October 13 |

I think this should work, let me know! Youā€™ll have to set up a virtual pin on your dashboard and replace the token with your token
#include <ET73.h> // First we must include the ET73 Library found here
#define MEAT_PROBE_PIN 2 //Now we define which analog pin weā€™re going to read our probe from
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <CayenneEthernet.h>

// Now we define an ET73 probe called meatProbe, and pass it the pin as the first argument, the rest of the arguments are optional
// ET73( int probe pin, int Number of samples (optional, default:10) , int sample interval in ms (optional, default:10) , bool debug (optional, default:false) )
ET73 meatProbe(MEAT_PROBE_PIN);

char token = ā€œyourtokenā€;

void setup() {
Serial.begin(9600); //Start the Serial for testing purposes
Cayenne.begin(token);
}

void loop() {
Cayenne.run();
}

CAYENNE_OUT(VIRTUAL_PIN){
//When we call the meat probe getTemp_F method, by default the library takes 24 readings at a 10ms interval
float myTemp = meatProbe.getTemp_F();

//Print out our results to the serial monitor
Serial.print(ā€œTemp: ā€œ);
Serial.print(myTemp);
Serial.print(ā€ F\nā€);

Cayenne.fahrenheitWrite(VIRTUAL_PIN, myTemp);
}
Visit Topic or reply to this email to respond.

In Reply To

adbrig4
October 12 |

Ok, Great. I know Ive asked this before. Is there away to make the Raspberry Pi use the MAX31855 Breakout and a driver like this I found tonight GitHub - Tuckie/max31855: Raspberry Pi driver for MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter to read and send temperature info to Cayenne for monitoring on the mobile IOS app etc with possible alerts? I think thisā€¦
Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

1 Like

According to the add device process you can use an official Arduino WiFi shield https://store.arduino.cc/usa/arduino-wifi-shield or https://store.arduino.cc/usa/arduino-wifi-101-shield although they appear to be retired now. I donā€™t own either and have never used them to connect so I canā€™t comment on it. You can also use an ESP8266 following these instructions but itā€™s not officially supported.

Bumping this old thread to share that weā€™ve just provided support in our MQTT Arduino library for using ESP8266 as a shield :slight_smile: Weā€™ve done basic testing and works well. Give it a try for your project and let us know how it works out for you !

Here is the updated library on our github:

and the code can be found here: