Mindfulness Is The Buddhist Practice Of Bringing One's Awareness To

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Mindfulness Is The Buddhist Practice Of Bringing One's Awareness To as PDF for free.

More details

  • Words: 372
  • Pages: 7
Mindfulness is the Buddhist practice of bringing one's awareness to focus on the present moment.

In Buddhism and other religions, rituals inculcate mindfulness in practitioners prior to entering spaces of contemplation.

In an interactive architecture, portals into contemplative spaces should actively cultivate mindfulness.

#include <math.h> //Smoothing code by David A. Mellis const int numReadings = 10; int readings[numReadings]; // the readings from the analog input int index = 0; // the index of the current reading inttotal = 0; // the running total intaverage = 0; // the average int prev= 0; // the previous average int present = 0; int ledpin= 11; // specify the red led pin //int greenpin= 10; // specify the green led pin //int bluepin= 9; // specify the blue led pin int solpin= 6; // specify the solenoid pin int sensorpin= 5; // specify the sensor pin double time = 0; double prevtime = 1; double Delay = 0; void setup(){ pinMode(8, OUTPUT); //specify led ground pin digitalWrite(8, LOW); //set led ground pin pinMode(2, OUTPUT); digitalWrite(2, HIGH); Serial.begin(4800); //begining serial connection @ 1200 baud //setup initial array values for (int thisReading = 0; thisReading < numReadings; thisReading++){ readings[thisReading] = 0; }} void loop(){ total= total - readings[index]; readings[index] = analogRead(sensorpin); total= total + readings[index]; index = index + 1; // if we're at the end of the array... if (index >= numReadings) { index = 0; prev = average; } // calculate the average: average = total / numReadings;

if (average > prev+250){ prev = average; time = millis(); time = fabs(time); Delay = (1/(time-prevtime))*1000000; Delay = Delay*Delay/2; analogWrite(ledpin, 255); // set the led to on analogWrite(solpin, 255); // set the solenoid to on present = analogRead(sensorpin); while (present >= 100){ delay(25); present = analogRead(sensorpin); } if (prevtime < 2) { Delay=0; } if (Delay <=1000){ Delay = 1000; } else if (Delay >=10000) { Delay = 10000; } prevtime = time + Delay; delay(Delay); // delay

}

for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { // sets the value (range from 0 to 255): analogWrite(ledpin, fadeValue); // wait for 15 milliseconds to see the dimming effect delay(15); } analogWrite(solpin, 0); // set the solenoid to off prevtime = time + Delay; }

Related Documents