Skip to content

Commit

Permalink
Update BLE_Sense_attempt2.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash2772 authored Apr 28, 2021
1 parent 6f0e8ed commit db74ee9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion BLE_Sense_attempt2/BLE_Sense_attempt2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ void loop() {
Serial.print('\t');
Serial.println(z);
}


//Detect launch with acceleration !!!!!!!Don't know if this should go in void loop!!!!!
accelMag = sqrt(x^2 + y^2 + z^2)//Magnitude of the acceleration
if (accelMag > 5) {//If the acceleration is higher than 5gs then start the recording of the data.
//start recording
//need to make it so that the acceleration is high for like 500ms before recording starts
//Would it be possible to also save the data for the 20 or so seconds before the launch?
}

//C02 and N02 Sensor, Ashley's code for MQ135
int reading = analogRead(sensorPin);
Serial.print("Gas sensor reading: ");
Expand Down

0 comments on commit db74ee9

Please sign in to comment.