File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ void setup() {
3535Set some options:
3636
3737``` c++
38- MagneticSensorMA730 sensor1 (SENSOR1_CS, true, mySPISettings);
38+ MagneticSensorMA730 sensor1 (SENSOR1_CS, mySPISettings);
3939```
4040
4141Use another SPI bus:
4242
4343```c++
4444void setup() {
45- sensor1.init(SPI2);
45+ sensor1.init(& SPI2);
4646}
4747```
4848
@@ -63,4 +63,12 @@ Here's how you can use it:
6363
6464 // get the raw 14 bit value
6565 uint16_t raw = sensor1.readRawAngle();
66+
67+ // get the field strength
68+ FieldStrength fs = sensor1.getFieldStrength();
69+ Serial.print(" Field strength: " );
70+ Serial.println(fs);
71+
72+ // set pulses per turn for encoder mode
73+ sensor1.setPulsesPerTurn(1000 ); // if we want 1000 PPR == 4000 CPR
6674```
You can’t perform that action at this time.
0 commit comments