Skip to content

Commit

Permalink
Cleaned up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
maidnl committed Oct 5, 2023
1 parent 7671ad2 commit 7a841e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
22 changes: 3 additions & 19 deletions examples/ScienceJournal/ScienceJournal.ino
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void setup(){
service.addCharacteristic(airQualityCharacteristic);
/* _________________________________________________________SOUND_INTENSITY */
service.addCharacteristic(sndIntensityCharacteristic);
/* ______!!! NOT AVAILABLE (should be delete?) !!!______________SOUND_PITCH */
/* _____________________________________________________________SOUND_PITCH */
service.addCharacteristic(sndPitchCharacteristic);
/* _________________________________________________________________INPUT_A */
service.addCharacteristic(inputACharacteristic);
Expand Down Expand Up @@ -164,19 +164,8 @@ void updateSubscribedCharacteristics(){


/* _______________________________________________________________PROXIMITY */
if (proximityCharacteristic.subscribed()){ // need to be fixed

if (proximityCharacteristic.subscribed()){
proximityCharacteristic.writeValue(science_kit.getProximity());


/*
if (science_kit.getUltrasonicIsConnected()){
proximityCharacteristic.writeValue(science_kit.getDistance()*100.0);
}
else{
proximityCharacteristic.writeValue(-1.0);
}
*/
}


Expand Down Expand Up @@ -241,19 +230,14 @@ void updateSubscribedCharacteristics(){
sndIntensityCharacteristic.writeValue(science_kit.getMicrophoneRMS());
}

/* ______!!! NOT AVAILABLE (should be delete?) !!!______________SOUND_PITCH */
/* NOTE: pith is frequency (not available because FFT cannot be performed) */
/* _____________________________________________________________SOUND_PITCH */
if(sndPitchCharacteristic.subscribed()){
sndPitchCharacteristic.writeValue(science_kit.getExternalTemperature());
}

/* _________________________________________________________________INPUT_A */
if (inputACharacteristic.subscribed()){
inputACharacteristic.writeValue(science_kit.getInputA());

/* NOTE_ OLD CODE USED FOR DEBUG
inputACharacteristic.writeValue(science_kit.getFrequency1());
*/
}

/* _________________________________________________________________INPUT_B */
Expand Down
1 change: 0 additions & 1 deletion src/Arduino_ScienceKitCarrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "Arduino_ScienceKitCarrier.h"

// static members must be initialized externally the class definition
short ScienceKitCarrier::sampleBuffer[MICROPHONE_BUFFER_SIZE];
volatile int ScienceKitCarrier::samplesRead;

Expand Down

0 comments on commit 7a841e4

Please sign in to comment.