Compare commits

...

6 commits

Author SHA1 Message Date
boutrie.eytan bc8b071a5a code Accel 2023-06-14 14:41:30 +02:00
boutrie.eytan d7a7796041 code Accel 2023-06-14 14:40:29 +02:00
boutrie.eytan f87d32fda6 code Accel 2023-06-14 10:40:56 +02:00
boutrie.eytan 363dbdd61a code Accel 2023-06-14 10:31:58 +02:00
boutrie.eytan 2033044d41 code Accel 2023-06-14 10:18:14 +02:00
boutrie.eytan 7b01756edc code Accel 2023-06-14 10:15:38 +02:00
2 changed files with 1 additions and 7 deletions

View file

@ -1,2 +1 @@
#Rotabator #Rotabator

View file

@ -33,20 +33,16 @@ S20A is 3.3V voltage regulator MIC5205-3.3BM5
*/ */
#include "MPU9250.h" #include "MPU9250.h"
#include "AccelStepper.h"
float biai = 1.25; float biai = 1.25;
// an MPU9250 object with the MPU-9250 sensor on I2C bus 0 with address 0x68 // an MPU9250 object with the MPU-9250 sensor on I2C bus 0 with address 0x68
MPU9250 IMU(Wire,0x68); MPU9250 IMU(Wire,0x68);
int status; int status;
AccelStepper stepper;
void setup() { void setup() {
// serial to display data // serial to display data
Serial.begin(115200); Serial.begin(115200);
stepper.setMaxSpeed(1700);
stepper.setSpeed(1700);
while(!Serial) {} while(!Serial) {}
// start communication with IMU // start communication with IMU
@ -63,7 +59,6 @@ void setup() {
void loop() { void loop() {
// read the sensor // read the sensor
IMU.readSensor(); IMU.readSensor();
stepper.runSpeed();
// display the data // display the data
Serial.print("AccelX: "); Serial.print("AccelX: ");
Serial.print(IMU.getAccelX_mss(),2); Serial.print(IMU.getAccelX_mss(),2);