Compare commits
6 commits
main
...
Accelerome
Author | SHA1 | Date | |
---|---|---|---|
boutrie.eytan | bc8b071a5a | ||
boutrie.eytan | d7a7796041 | ||
boutrie.eytan | f87d32fda6 | ||
boutrie.eytan | 363dbdd61a | ||
boutrie.eytan | 2033044d41 | ||
boutrie.eytan | 7b01756edc |
|
@ -33,20 +33,16 @@ S20A is 3.3V voltage regulator MIC5205-3.3BM5
|
|||
*/
|
||||
|
||||
#include "MPU9250.h"
|
||||
#include "AccelStepper.h"
|
||||
|
||||
float biai = 1.25;
|
||||
|
||||
// an MPU9250 object with the MPU-9250 sensor on I2C bus 0 with address 0x68
|
||||
MPU9250 IMU(Wire,0x68);
|
||||
int status;
|
||||
AccelStepper stepper;
|
||||
|
||||
void setup() {
|
||||
// serial to display data
|
||||
Serial.begin(115200);
|
||||
stepper.setMaxSpeed(1700);
|
||||
stepper.setSpeed(1700);
|
||||
while(!Serial) {}
|
||||
|
||||
// start communication with IMU
|
||||
|
@ -63,7 +59,6 @@ void setup() {
|
|||
void loop() {
|
||||
// read the sensor
|
||||
IMU.readSensor();
|
||||
stepper.runSpeed();
|
||||
// display the data
|
||||
Serial.print("AccelX: ");
|
||||
Serial.print(IMU.getAccelX_mss(),2);
|
Loading…
Reference in a new issue