To follow up with Adamās comment, you can do this with virtual analogs on the Arduino platform now if you donāt want to wait.
Read in the serial stream, parse, and create access functions as shown in the Arduino examples on Cayenne. Hereās how I might do it on the ESP8266:
//#define CAYENNE_DEBUG // Uncomment to show debug messages
//#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "<your_token>";
// Your network name and password.
char ssid[] = "<your_ssid>";
char password[] = "<your_pwd>";
float firstParm;
float secondParm;
float thirdParm;
void setup()
{
Serial.begin(9600);
Cayenne.begin(token, ssid, password);
}
void loop()
{
Cayenne.run();
if (Serial.find(":")) //Some start token. Could be newline, etc.
{
firstParm = Serial.parseFloat(); //Note that the parse routines expect CSV
secondParm = Serial.parseFloat();
thirdParm = Serial.parseFloat();
//...etcetera
}
}
CAYENNE_OUT(1)
{
Cayenne.virtualWrite(1, firstParm);
}
CAYENNE_OUT(2)
{
Cayenne.virtualWrite(2, secondParm);
}
CAYENNE_OUT(3)
{
Cayenne.virtualWrite(3, thirdParm);
}
Tried the Cayenne.virtualWrite and it is working fine on Uno.
Dash board was updated with the expected values. Just came to know that āmobile appā is not ready as it was for RPI.
I would like to replicate the same ( Cayenne.virtualWrite api.) in RPi as well.
Can you please give pointers on how to start developing on RPI for Cayenee. All I know is that Cayenne agent is installed in /etc/mydevices. Not sure where the code resides where we can use.
Could not find the right docs for development env for RPi for Cayenne agent
The Android support for Arduino is nearing Beta release, so that wonāt be long at all.
It will be a little different under RPi though, using a File I/O mechanism, but perhaps some Python examples will be developed for easier interaction with your user driver.
Thanks Craig !!!
Sorry for the delayed reply ( it was a long weekend for us )
Yeah we need to have some python code to do all the parsing and interfacing with the cayenne cloud interface
using Cayenne.virtualWrite.
Currently setting the dev env on RPi for cayenne agent interface
Any pointers for docs/sample code for using cayenne driver interface on RPi would be helpful.