10-26-2022, 12:29 PM
(This post was last modified: 10-29-2022, 02:14 PM by TorstenKlf.)
Hello,
it must be very simple. For my ESP32 Hall-Sensor I want to show the measured valut underneath the graph. Can anybody help, pease?
Torsten
#include <phyphoxBle.h>
int AnalogPin=27;
float Messwert;
float Magnetfeld;
void setup() {
PhyphoxBLE:tart("Magnetfeldsensor_01"); //Start the BLE server
//Experiment
PhyphoxBleExperiment experiment;
experiment.setTitle("Magnetfeld");
experiment.setCategory("Arduino Experiments");
experiment.setDescription("Plot the magnetic field of a Hall sensor over time.");
//View
PhyphoxBleExperiment::View view;
//Graph
PhyphoxBleExperiment::Graph graph;
graph.setLabel("B over time");
graph.setUnitX("s");
graph.setUnitY("mT");
graph.setLabelX("time");
graph.setLabelY("B");
// graph.setChannel(1,2);
view.addElement(graph); //Attach graph to view
experiment.addView(view); //Attach view to experiment
PhyphoxBLE::addExperiment(experiment); //Attach experiment to server
}
it must be very simple. For my ESP32 Hall-Sensor I want to show the measured valut underneath the graph. Can anybody help, pease?
Torsten
#include <phyphoxBle.h>
int AnalogPin=27;
float Messwert;
float Magnetfeld;
void setup() {
PhyphoxBLE:tart("Magnetfeldsensor_01"); //Start the BLE server
//Experiment
PhyphoxBleExperiment experiment;
experiment.setTitle("Magnetfeld");
experiment.setCategory("Arduino Experiments");
experiment.setDescription("Plot the magnetic field of a Hall sensor over time.");
//View
PhyphoxBleExperiment::View view;
//Graph
PhyphoxBleExperiment::Graph graph;
graph.setLabel("B over time");
graph.setUnitX("s");
graph.setUnitY("mT");
graph.setLabelX("time");
graph.setLabelY("B");
// graph.setChannel(1,2);
view.addElement(graph); //Attach graph to view
experiment.addView(view); //Attach view to experiment
PhyphoxBLE::addExperiment(experiment); //Attach experiment to server
}