sorry for some reasons i dont know the netpage doesn't allow me to upload the ino file, so I paste the code here:
(It is actually other's code, I am just a new learner)
#include <phyphoxBle.h>
int Pin = 33;
int iV = 0;
float R=200.0;
void setup()
{
PhyphoxBLE:tart("Capacitor");
PhyphoxBleExperiment plotCapacitor;
plotCapacitor.setTitle("Phyphox Capacitor");
//View
PhyphoxBleExperiment::View firstView;
firstView.setLabel("MyView"); //Create a "view"
//Graph
PhyphoxBleExperiment::Graph firstGraph;
firstGraph.setLabel("I-t graph");
firstGraph.setUnitX("s");
firstGraph.setUnitY("A");
firstGraph.setLabelX("t");
firstGraph.setLabelY("I");
firstGraph.setChannel(0, 1);
firstView.addElement(firstGraph);
plotCapacitor.addView(firstView);
PhyphoxBLE::addExperiment(plotCapacitor);
}
void loop()
{
iV = analogRead(Pin);
float cur = iV * 5.0 / 1024.0 / 4.0/R;
PhyphoxBLE::write(cur);
delay(50);
PhyphoxBLE::poll();
and this is the information I copied from phyphox on my phone:
phyphox
Version: 1.1.5
Build: 1010502
File format: 1.9
Permissions
INTERNET: yes
RECORD_AUDIO: yes
READ_EXTERNAL_STORAGE: no
BLUETOOTH: yes
BLUETOOTH_ADMIN: yes
ACCESS_COARSE_LOCATION: no
ACCESS_FINE_LOCATION: yes
CAMERA: yes
Device
Model: CDY-AN90
Brand: HONOR
Board: HWCDY-H
Manufacturer: HUAWEI
ABIS: arm64-v8a, armeabi-v7a, armeabi
Base OS:
Codename: REL
Release: 10
Patch: 2020-11-01
Sensors
加速度计 (type 1)
- Name: acc_s001_002
- Range: 78.4532 m/s²
- Resolution: 9.576806E-6 m/s²
- Min delay: 4000 µs
- Max delay: 200000 µs
- Power: 0.23 mA
- Vendor: acc_s001_002
- Version: 1
磁力计 (type 2)
- Name: mag_s002_001
- Range: 2000.0 µT
- Resolution: 0.0625 µT
- Min delay: 10000 µs
- Max delay: 200000 µs
- Power: 6.8 mA
- Vendor: mag_s002_001
- Version: 1001
未知传感器 (type 3)
- Name: orientation
- Range: 360.0
- Resolution: 0.1
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 13.0 mA
- Vendor: huawei
- Version: 1
光传感器 (type 5)
- Name: als_s002_001
- Range: 10000.0 lx
- Resolution: 1.0 lx
- Min delay: 0 µs
- Max delay: 0 µs
- Power: 0.75 mA
- Vendor: als_s002_001
- Version: 1
距离传感器 (type 8)
- Name: ps_s002_001
- Range: 5.0 cm
- Resolution: 5.0 cm
- Min delay: 0 µs
- Max delay: 200000 µs
- Power: 0.75 mA
- Vendor: ps_s002_001
- Version: 1
陀螺仪 (type 4)
- Name: gyro_s001_002
- Range: 34.906586 rad/s
- Resolution: 1.7453292E-5 rad/s
- Min delay: 5000 µs
- Max delay: 200000 µs
- Power: 6.1 mA
- Vendor: gyro_s001_002
- Version: 1
未知传感器 (type 9)
- Name: gravity
- Range: 9.80665
- Resolution: 0.15328126
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 0.2 mA
- Vendor: huawei
- Version: 1
线加速度 (type 10)
- Name: linear Acceleration
- Range: 78.4532 m/s²
- Resolution: 0.009576807 m/s²
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 0.2 mA
- Vendor: huawei
- Version: 1
Attitude (type 11)
- Name: rotation Vector
- Range: 1.0
- Resolution: 5.9604645E-8
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 6.1 mA
- Vendor: huawei
- Version: 1
供应商特定 (type 65538)
- Name: HALL sensor
- Range: 1.0
- Resolution: 1.0
- Min delay: 0 µs
- Max delay: 0 µs
- Power: 0.75 mA
- Vendor: huawei
- Version: 1
磁力计 (type 14)
- Name: uncalibrated Magnetic Field
- Range: 2000.0 µT
- Resolution: 0.0625 µT
- Min delay: 16667 µs
- Max delay: 200000 µs
- Power: 6.8 mA
- Vendor: Asahi Kasei Microdevices
- Version: 1
未知传感器 (type 15)
- Name: game Rotation Vector
- Range: 1.0
- Resolution: 5.9604645E-8
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 6.1 mA
- Vendor: huawei
- Version: 1
未知传感器 (type 16)
- Name: uncalibrated Gyroscope
- Range: 34.906586
- Resolution: 1.7453292E-5
- Min delay: 5000 µs
- Max delay: 200000 µs
- Power: 6.1 mA
- Vendor: STMicroelectronics
- Version: 1
未知传感器 (type 17)
- Name: significant Motion
- Range: 2.14748365E9
- Resolution: 1.0
- Min delay: -1 µs
- Max delay: 0 µs
- Power: 0.23 mA
- Vendor: huawei
- Version: 1
未知传感器 (type 19)
- Name: step counter
- Range: 2.14748365E9
- Resolution: 1.0
- Min delay: 0 µs
- Max delay: 0 µs
- Power: 0.23 mA
- Vendor: huawei
- Version: 1
未知传感器 (type 20)
- Name: geomagnetic Rotation Vector
- Range: 1.0
- Resolution: 5.9604645E-8
- Min delay: 10000 µs
- Max delay: 200000 µs
- Power: 6.1 mA
- Vendor: huawei
- Version: 1
供应商特定 (type 65544)
- Name: phonecall sensor
- Range: 1.0
- Resolution: 1.0
- Min delay: 10000 µs
- Max delay: 500000 µs
- Power: 0.23 mA
- Vendor: huawei
- Version: 1
供应商特定 (type 65552)
- Name: RPC sensor
- Range: 65535.0
- Resolution: 1.0
- Min delay: 500000 µs
- Max delay: 1000000 µs
- Power: 5.0 mA
- Vendor: huawei
- Version: 1
未知传感器 (type 35)
- Name: uncalibrated Accelerometer
- Range: 78.4532
- Resolution: 9.576806E-6
- Min delay: 5000 µs
- Max delay: 200000 µs
- Power: 0.23 mA
- Vendor: huawei
- Version: 1
供应商特定 (type 65556)
- Name: drop sensor
- Range: 65535.0
- Resolution: 1.0
- Min delay: 0 µs
- Max delay: 0 µs
- Power: 0.25 mA
- Vendor: huawei
- Version: 1
(It is actually other's code, I am just a new learner)
#include <phyphoxBle.h>
int Pin = 33;
int iV = 0;
float R=200.0;
void setup()
{
PhyphoxBLE:tart("Capacitor");
PhyphoxBleExperiment plotCapacitor;
plotCapacitor.setTitle("Phyphox Capacitor");
//View
PhyphoxBleExperiment::View firstView;
firstView.setLabel("MyView"); //Create a "view"
//Graph
PhyphoxBleExperiment::Graph firstGraph;
firstGraph.setLabel("I-t graph");
firstGraph.setUnitX("s");
firstGraph.setUnitY("A");
firstGraph.setLabelX("t");
firstGraph.setLabelY("I");
firstGraph.setChannel(0, 1);
firstView.addElement(firstGraph);
plotCapacitor.addView(firstView);
PhyphoxBLE::addExperiment(plotCapacitor);
}
void loop()
{
iV = analogRead(Pin);
float cur = iV * 5.0 / 1024.0 / 4.0/R;
PhyphoxBLE::write(cur);
delay(50);
PhyphoxBLE::poll();
and this is the information I copied from phyphox on my phone:
phyphox
Version: 1.1.5
Build: 1010502
File format: 1.9
Permissions
INTERNET: yes
RECORD_AUDIO: yes
READ_EXTERNAL_STORAGE: no
BLUETOOTH: yes
BLUETOOTH_ADMIN: yes
ACCESS_COARSE_LOCATION: no
ACCESS_FINE_LOCATION: yes
CAMERA: yes
Device
Model: CDY-AN90
Brand: HONOR
Board: HWCDY-H
Manufacturer: HUAWEI
ABIS: arm64-v8a, armeabi-v7a, armeabi
Base OS:
Codename: REL
Release: 10
Patch: 2020-11-01
Sensors
加速度计 (type 1)
- Name: acc_s001_002
- Range: 78.4532 m/s²
- Resolution: 9.576806E-6 m/s²
- Min delay: 4000 µs
- Max delay: 200000 µs
- Power: 0.23 mA
- Vendor: acc_s001_002
- Version: 1
磁力计 (type 2)
- Name: mag_s002_001
- Range: 2000.0 µT
- Resolution: 0.0625 µT
- Min delay: 10000 µs
- Max delay: 200000 µs
- Power: 6.8 mA
- Vendor: mag_s002_001
- Version: 1001
未知传感器 (type 3)
- Name: orientation
- Range: 360.0
- Resolution: 0.1
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 13.0 mA
- Vendor: huawei
- Version: 1
光传感器 (type 5)
- Name: als_s002_001
- Range: 10000.0 lx
- Resolution: 1.0 lx
- Min delay: 0 µs
- Max delay: 0 µs
- Power: 0.75 mA
- Vendor: als_s002_001
- Version: 1
距离传感器 (type 8)
- Name: ps_s002_001
- Range: 5.0 cm
- Resolution: 5.0 cm
- Min delay: 0 µs
- Max delay: 200000 µs
- Power: 0.75 mA
- Vendor: ps_s002_001
- Version: 1
陀螺仪 (type 4)
- Name: gyro_s001_002
- Range: 34.906586 rad/s
- Resolution: 1.7453292E-5 rad/s
- Min delay: 5000 µs
- Max delay: 200000 µs
- Power: 6.1 mA
- Vendor: gyro_s001_002
- Version: 1
未知传感器 (type 9)
- Name: gravity
- Range: 9.80665
- Resolution: 0.15328126
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 0.2 mA
- Vendor: huawei
- Version: 1
线加速度 (type 10)
- Name: linear Acceleration
- Range: 78.4532 m/s²
- Resolution: 0.009576807 m/s²
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 0.2 mA
- Vendor: huawei
- Version: 1
Attitude (type 11)
- Name: rotation Vector
- Range: 1.0
- Resolution: 5.9604645E-8
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 6.1 mA
- Vendor: huawei
- Version: 1
供应商特定 (type 65538)
- Name: HALL sensor
- Range: 1.0
- Resolution: 1.0
- Min delay: 0 µs
- Max delay: 0 µs
- Power: 0.75 mA
- Vendor: huawei
- Version: 1
磁力计 (type 14)
- Name: uncalibrated Magnetic Field
- Range: 2000.0 µT
- Resolution: 0.0625 µT
- Min delay: 16667 µs
- Max delay: 200000 µs
- Power: 6.8 mA
- Vendor: Asahi Kasei Microdevices
- Version: 1
未知传感器 (type 15)
- Name: game Rotation Vector
- Range: 1.0
- Resolution: 5.9604645E-8
- Min delay: 10000 µs
- Max delay: 20000 µs
- Power: 6.1 mA
- Vendor: huawei
- Version: 1
未知传感器 (type 16)
- Name: uncalibrated Gyroscope
- Range: 34.906586
- Resolution: 1.7453292E-5
- Min delay: 5000 µs
- Max delay: 200000 µs
- Power: 6.1 mA
- Vendor: STMicroelectronics
- Version: 1
未知传感器 (type 17)
- Name: significant Motion
- Range: 2.14748365E9
- Resolution: 1.0
- Min delay: -1 µs
- Max delay: 0 µs
- Power: 0.23 mA
- Vendor: huawei
- Version: 1
未知传感器 (type 19)
- Name: step counter
- Range: 2.14748365E9
- Resolution: 1.0
- Min delay: 0 µs
- Max delay: 0 µs
- Power: 0.23 mA
- Vendor: huawei
- Version: 1
未知传感器 (type 20)
- Name: geomagnetic Rotation Vector
- Range: 1.0
- Resolution: 5.9604645E-8
- Min delay: 10000 µs
- Max delay: 200000 µs
- Power: 6.1 mA
- Vendor: huawei
- Version: 1
供应商特定 (type 65544)
- Name: phonecall sensor
- Range: 1.0
- Resolution: 1.0
- Min delay: 10000 µs
- Max delay: 500000 µs
- Power: 0.23 mA
- Vendor: huawei
- Version: 1
供应商特定 (type 65552)
- Name: RPC sensor
- Range: 65535.0
- Resolution: 1.0
- Min delay: 500000 µs
- Max delay: 1000000 µs
- Power: 5.0 mA
- Vendor: huawei
- Version: 1
未知传感器 (type 35)
- Name: uncalibrated Accelerometer
- Range: 78.4532
- Resolution: 9.576806E-6
- Min delay: 5000 µs
- Max delay: 200000 µs
- Power: 0.23 mA
- Vendor: huawei
- Version: 1
供应商特定 (type 65556)
- Name: drop sensor
- Range: 65535.0
- Resolution: 1.0
- Min delay: 0 µs
- Max delay: 0 µs
- Power: 0.25 mA
- Vendor: huawei
- Version: 1