This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Arduino Nano - Phyphox
#1
Hi,

I am currently designing an experiment for my course in Edge ML and the idea is to use arduino nano BLE 33 sense for data aquision and ML inference. I have connected the board via BLE to Phyphox and it has worked well. But I have now migrated to the rev 2 version of the board and now I do not get any data from the board. I hope someone have some idea what is wrong.

thanks,

Fredrik

My sketch:

#include <phyphoxBle.h>
#include <Arduino_LSM9DS1.h>
void setup()
{
   PhyphoxBLE::start("IMU - Gyroscope");
   //Experiment
   PhyphoxBleExperiment PlotAcc;  
   PlotAcc.setTitle("Gyroscope Plotter");
   PlotAcc.setCategory("Arduino Experiments");
   PlotAcc.setDescription("Plots angular velocity measured by the Arduino card's sensors");
   //View
   PhyphoxBleExperiment::View firstView;
   firstView.setLabel("FirstView"); //Create a "view"
   //Graph
   PhyphoxBleExperiment::Graph firstGraph;          
   firstGraph.setLabel("X Rotatation over time");
   firstGraph.setUnitX("s");
   firstGraph.setUnitY("deg/s");
   firstGraph.setLabelX("time");
   firstGraph.setLabelY("X Rotation");
   /* Assign Channels, so which data is plotted on x or y axis
   *  first parameter represents x-axis, second y-axis
   *  Channel 0 means a timestamp is created after the BLE package arrives in phyphox
   *  Channel 1 to N corresponding to the N-parameter which is written in server.write()
   */
   firstGraph.setChannel(0,1);    
   PhyphoxBleExperiment::Graph secondGraph;          
   secondGraph.setLabel("Y Rotation over time");
   secondGraph.setUnitX("s");
   secondGraph.setUnitY("deg/s");
   secondGraph.setLabelX("time");
   secondGraph.setLabelY("Y Rotation");
   
   secondGraph.setChannel(0,2);
   PhyphoxBleExperiment::Graph thirdGraph;          
   thirdGraph.setLabel("Z Rotation over time");
   thirdGraph.setUnitX("s");
   thirdGraph.setUnitY("deg/s");
   thirdGraph.setLabelX("time");
   thirdGraph.setLabelY("Z Rotation");
   
   thirdGraph.setChannel(0,3);
   firstView.addElement(firstGraph);            //attach graph to view
   firstView.addElement(secondGraph);
   firstView.addElement(thirdGraph);
   PlotAcc.addView(firstView);         //Attach view to experiment
     //Export
   PhyphoxBleExperiment::ExportSet mySet;       //Provides exporting the data to excel etc.
   mySet.setLabel("mySet");
   PhyphoxBleExperiment::ExportData gx;
   gx.setLabel("gx");
   gx.setDatachannel(1);
   PhyphoxBleExperiment::ExportData gy;
   gy.setLabel("gy");
   gy.setDatachannel(2);
   PhyphoxBleExperiment::ExportData gz;
   gz.setLabel("gz");
   gz.setDatachannel(3);
   mySet.addElement(gx);                   //attach data to exportSet
   mySet.addElement(gy);      
   mySet.addElement(gz);                  //attach data to exportSet
   PlotAcc.addExportSet(mySet);        //attach exportSet to experiment
   PhyphoxBLE::addExperiment(PlotAcc);      //Attach experiment to server
   
   if (!IMU.begin()) {
     while (1);
   }
}
void loop()
{
  float gx, gy, gz;
  if (IMU.gyroscopeAvailable()) {
    IMU.readGyroscope(gx, gy, gz);
    PhyphoxBLE::write(gx, gy, gz);
   
  }
}
Reply


Messages In This Thread
Arduino Nano - Phyphox - by Fredrik Frisk - 10-22-2024, 08:57 AM
RE: Arduino Nano - Phyphox - by Jens Noriʇzsɔɥ - 10-22-2024, 09:42 AM
RE: Arduino Nano - Phyphox - by Fredrik Frisk - 10-22-2024, 09:44 AM
RE: Arduino Nano - Phyphox - by Jens Noriʇzsɔɥ - 10-22-2024, 10:01 AM
RE: Arduino Nano - Phyphox - by Fredrik Frisk - 10-22-2024, 01:08 PM
RE: Arduino Nano - Phyphox - by Jens Noriʇzsɔɥ - 10-22-2024, 02:32 PM
RE: Arduino Nano - Phyphox - by fbouquet - 10-22-2024, 05:25 PM
RE: Arduino Nano - Phyphox - by Fredrik Frisk - 10-31-2024, 08:57 PM

Forum Jump: