From 0f9b4b6c757c11e954cdbd1513fe51643efc0dfe Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 5 Aug 2016 10:53:13 +0100 Subject: move every sample we get a sample every second, the keepon can deal with that many commands, just send them all --- eeg.ino | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eeg.ino b/eeg.ino index b228bf6..3bd91c5 100644 --- a/eeg.ino +++ b/eeg.ino @@ -190,7 +190,6 @@ void setup() { const int hist_width=3; const int hist_pad=1; -int samples_delay; byte attention, meditation, quality; int hist_height[8]; @@ -218,10 +217,9 @@ void loop() { hist_height[x] = power[x] * 30 / max_value; } - if (quality < 10 && ++samples_delay > 5) { + if (quality < 10) { keepon.pan(attention); keepon.tilt(meditation); - samples_delay=0; uView.setCursor(5,0);uView.print("sent"); } -- cgit v1.2.3