We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 019914d commit 90d483fCopy full SHA for 90d483f
1 file changed
Adafruit_Feather_Sense/feather_sense_sensor_demo.py
@@ -22,8 +22,8 @@
22
23
def normalized_rms(values):
24
minbuf = int(sum(values) / len(values))
25
- return math.sqrt(sum(float(sample - minbuf) *
26
- (sample - minbuf) for sample in values) / len(values))
+ return int(math.sqrt(sum(float(sample - minbuf) *
+ (sample - minbuf) for sample in values) / len(values)))
27
28
apds9960.enable_proximity = True
29
apds9960.enable_color = True
@@ -44,5 +44,5 @@ def normalized_rms(values):
44
print("Acceleration: {:.2f} {:.2f} {:.2f} m/s^2".format(*lsm6ds33.acceleration))
45
print("Gyro: {:.2f} {:.2f} {:.2f} dps".format(*lsm6ds33.gyro))
46
print("Humidity: {:.1f} %".format(sht31d.relative_humidity))
47
- print("Sound level:", int(normalized_rms(samples)))
+ print("Sound level:", normalized_rms(samples))
48
time.sleep(0.3)
0 commit comments