Spent Saturday September  18 @ Maker Faire helping Joe and Joel sell their product. Maker. There were a lot of cool projects there, including:

  • the mechanical sculpture
  • rubix-cube-solving robot
  • scratch-for-arduino project from the Media Lab
  • sudoku using wiretube integers

Reading: Everyware Adam Greenfield

UbiComp at Room Scale

  • Definition: Systems in the scale of a room know whether you or objects are in that specific ‘room’, where you are in that room, and aspects of that room and the objects in it.
  • early ubicomp focused on the office environment
  • features of rooms: walls, doorways, furniture, floor
  • important to know where people are in a space
  • differentiate between people: smart floors & footfall signatures
  • detect falls & report them to emergency services
  • NTT DoCoMo CarpetLAN project:
  • SenseaCell sensor grid
  • Doorways can count people, or inform about activity within a space
  • Motorola: Physical Science Research Lab
  • Fridges/airconditioners/microwaves – not sure this is the right scale
  • Media Lab: Ambient Room

Example 1: Presence Detection

  • Motion Sensor Lights in offices and bathrooms, etc.
  • RFID in doorframes that identifies simply the number of people or also who those people are who are in a space
  • Success: don’t think about saving electricity, don’t think about counting the students
  • Failures: easy to hack, not always reliable ( garage doors that open on command), too sensitive

Example 2: Access Control

  • RFID Door Locks let different people access spaces.
  • Used in hotels, apartment buildings, offices, etc
  • Success: Simple interface, many different design results, keys are easy to replace/reuse
  • Failures: Easy to hack, another card to carry

Example 3: Environmental Control

  • Single room environmental control including ACs, lighting
  • Success:
  • Failure:

Example 4: Car-Parking-Assistance

  • Not sure if this is the right scale, but it provides information about your space and communicates it with you in a different form – a screen or an audible sound

Opportunities/Challenges:

  • It seems like there aren’t many projects at this scale, so there is still a lot of opportunity to design interventions here
  • The problem: can lead to concerns of privacy, needs to do a lot of work to become beautify/architecturally accepted

Interactions with Computers Today

  • 8am: Cellphone alarm
  • 815am: Check email/rss feed on laptop
  • 900am: Run – Lights/sensors in stoplights on
  • 10am: Check email/watch a show on Hulu
  • 11am: make lunch/eat breakfast – electrical grid
  • 12pm: School – a/c, lighting systems, elevator systems, internet
  • 1pm: School – a/c, lighting systems, elevator systems, internet
  • 8pm: Walk home: Cellular phone, street lights systems, lights/sensors in stoplights, water fountain systems (washSqPk)
  • 830pm: Dinner/Relax: Cable Tv, Electric Grid (fridge)
  • 9pm: Hw: Internet, lighting/electricity

Interesting Quotes/Ideas

  • “The most profound technologies are those that disappear. They weave themselves into the fabric of everyday life until they are indistinguishable from it.”
  • Think of ways for computers to disappear, vanish into the background of the natural human environment
  • “Whenever people learn something sufficiently well, they cease to be aware of it.”
  • “tabs, pads and boards” – the different scales of interfaces
  • “Boards built by Richard Bruce and Scott Elrod at PARC currently measure about 40 by 60 inches and display 1024×768 black-and-white pixels.” – Haha. This is my computer screen resolution now, in a quarter of the size
  • Interesting to think about computers and applications dealing with information coming from/being stored/being displayed on many different machines and platforms
  • “Most important, ubiquitous computers will help overcome the problem of information overload. There is more information available at our fingertips during a walk in the woods than in any computer system, yet people find a walk among trees relaxing and computers frustrating. Machines that fit the human environment, instead of forcing humans to enter theirs, will make using a computer as refreshing as taking a walk in the woods.”

Summary/Response

  • The last paragraph of this paper is really the most interesting one to me. If we stop having to be aware of all of the information and technology we interact with, will this overload disappear?
  • The idea of different sized screens is very perceptive, but I think it has just about outlived its usefulness. it is now time to move beyond screens as our primary interface and work to make interfaces that blend in, that use 3d space
  • Some of the examples (ie, teleconference/video/lookup ) seem dated, but it’s interesting to realize that this technology, while possible, still hasn’t been perfected. I also think about how much information needs to be stored and sifted through if every interaction becomes a video conference, and every video conference is recorded for future analysis/playback. It is no wonder that HP and Dell were in a bidding war over a company that specializes in data storage!
  • I like the idea of technology that tells you where the open parking spot is.
  • It was funny to read the word email written out as electronic mail.

Interesting Quotes/Ideas

  • Ubiquitous Computing: ‘Also known as ambient, physical, embedded,
    environmental, or pervasive computing’
  • “Appropriateness surpasses performance as the key to technological success.” (pg3)
  • We will stop carrying devices. Instead, we will walk up to ‘anonymous devices’ and they will adopt our ‘information personalities’ while also considering the need for privacy and security (pg 7)
  • cyberspace – everyone believes that there is a ‘there’ inside the screen (pg 9)
  • Virtual Reality failed because we orient with our bodies too, not just our minds (pg 10)
  • “As a form of urbanism, cyberspace was perhaps also some last version of what is sometimes called the project of transparency.” (pg 11)
  • “interaction designers now turn to the patterns of the living world as something other than a clean slate, and something to be understood, not overcome.” (pg 12)
  • “Flow itself now became the fundamental concern of the architect, not only for people and their vehicles, but for conceptual space.” (pg 13)
  • “Surveillance, for instance, has become an unfortunate fact of life. The loss of privacy has become a central theme in cultural studies of information technology” (pg15)
  • “Generally as information becomes more and more abundant, clear views through it become less and less possible.” (pg 15)
  • Idea of Microsoft Word Paperclip coming to the physical world is very scary
  • “Proactive information feeds treat all quiet time and space as something that needs filling. Portable and embedded devices take these streams out from your computer screen and into the world, where they are more difficult to turn off.” (pg 17)
  • “Only when technology makes deliberative and variable response to each in a series of exchanges is it at all interactive.” (pg 20)
  • “No longer just made of objects, computing now consists of situations.” (pg 21)

Summary/Response

  • There will be friction/fear about ubiComp until it becomes so ordinary that we fail to notice it or think about it
  • There will be hiccups, and things we didn’t think about, but we are already past the point of failing the way virtual reality did
  • People have different ideas about what ‘designing an interface’ means, but with ubicomp we will know we are successful when the interface becomes invisible/doesn’t require active participation
  • This article talks about how we will talk and wave our hands at interfaces of the future, but the one thing about typing interfaces is that they afford us privacy; people around us have to go to great lengths to see what we are typing, but it is very easy to just observe from afar or eavesdrop on an interaction that engages the entire body.
  • People don’t want interfaces to guess what they want, but they also don’t want to take the time, or have the skills, required to create custom interfaces. This poses a major problem, because everyone uses their devices and tools in different ways and for slightly different purposes. Interfaces won’t disappear into the environment if people have to actively customize them.
  • It is important to continually reevaluate the development of this technology in its environment, the world around us, as that environment changes. We keep designing for the world of tomorrow, but it is a moving target

It took me a really long time to attach wheels to something in any way that resembled a robot. It currently is a lot easier to control steering using speed and two wheels rather than one wheel and a servo. Maybe this will updated in the next version? I also only have one light sensitive resistor on this model, so the direction it turns is determined by the value the resistor reads. In the future, it would be great to have 4 readings rather than one, and compare them to determine direction.


Project 1: Serial input to Digital Output

Arduino Code:

/*
Created by Andrea Bradshaw
Spring 2010 – Physical Computing 2
Parsons MFA DT
*/

//
const int numDig = 3;
const int numBin = 4;
int counter = 0;

int binaryMem[numDig] = {0, 1, 2};

// Pins for outputing binary for display
int bin[numBin] = {2, 3, 4, 5};

// Pins for selecting which digit is lit up
int digit[numDig] = {10, 7, 8};

int ledPin =  13;
// Breaks simple display loop
boolean newInput = false;

void setup(){
// initialize interaction screen

pinMode(ledPin, OUTPUT);
// intialize pins for output
for (int i = 0; i < numDig; i++){
pinMode(digit[i], OUTPUT);
}

for (int i = 0; i < numBin; i++){
pinMode(bin[i], OUTPUT);
}

// set memory to random value initially
//binaryMem[3] = {0, 1, 2};

Serial.begin(9600);
Serial.println(“Done setup”);
}

void loop(){
/*
digitalWrite(ledPin, HIGH);   // set the LED on
delay(1000);                  // wait for a second
digitalWrite(ledPin, LOW);    // set the LED off
delay(1000);                  // wait for a second
*/
for (int i = 0; i < 3; i++){
digitalWrite(digit[i], HIGH);
}

for (int i = 0; i < 3; i++){
for (int j = 0; j < 3; j++){
if(j != i) digitalWrite(digit[j], HIGH);
else digitalWrite(digit[j], LOW);
}
display(binaryMem[i]);
delay(1);
}

while (Serial.available() > 0){

binaryMem[counter] = Serial.read();
counter++;
if (counter == 3) counter = 0;
}

for (int i = 0; i < 3; i++){
inputToOutput(binaryMem[i], i);
}
}

void display(int input){
if (input == 0){                // 0
digitalWrite(bin[0], 0);
digitalWrite(bin[1], 0);
digitalWrite(bin[2], 0);
digitalWrite(bin[3], 0);
}
if (input == 1){                // 0
digitalWrite(bin[0], 1);
digitalWrite(bin[1], 0);
digitalWrite(bin[2], 0);
digitalWrite(bin[3], 0);
}
if (input == 2){                // 0
digitalWrite(bin[0], 0);
digitalWrite(bin[1], 1);
digitalWrite(bin[2], 0);
digitalWrite(bin[3], 0);
}
if (input == 3){                // 0
digitalWrite(bin[0], 1);
digitalWrite(bin[1], 1);
digitalWrite(bin[2], 0);
digitalWrite(bin[3], 0);
}
if (input == 4){                // 0
digitalWrite(bin[0], 0);
digitalWrite(bin[1], 0);
digitalWrite(bin[2], 1);
digitalWrite(bin[3], 0);
}
if (input == 5){                // 0
digitalWrite(bin[0], 1);
digitalWrite(bin[1], 0);
digitalWrite(bin[2], 1);
digitalWrite(bin[3], 0);
}
if (input == 6){                // 0
digitalWrite(bin[0], 0);
digitalWrite(bin[1], 1);
digitalWrite(bin[2], 1);
digitalWrite(bin[3], 0);
}
if (input == 7){                // 0
digitalWrite(bin[0], 1);
digitalWrite(bin[1], 1);
digitalWrite(bin[2], 1);
digitalWrite(bin[3], 0);
}
if (input == 8){                // 0
digitalWrite(bin[0], 0);
digitalWrite(bin[1], 0);
digitalWrite(bin[2], 0);
digitalWrite(bin[3], 1);
}
if (input == 9){                // 0
digitalWrite(bin[0], 1);
digitalWrite(bin[1], 0);
digitalWrite(bin[2], 0);
digitalWrite(bin[3], 1);
}

/*
for (int i = 0; i < 3; i++){
for (int j = 0; j < 3; j++){
if (i == j) {
digitalWrite(digit[j], LOW);
for (int k = 0; k < 4; k++){
digitalWrite(bin[0], binaryMem[j][k]);
digitalWrite(bin[1], binaryMem[j][k]);
digitalWrite(bin[2], binaryMem[j][k]);
digitalWrite(bin[3], binaryMem[j][k]);
}
}

else        digitalWrite(digit[j], HIGH);
}

delay(1000);
}*/
}

void inputToOutput(int input, int digitVal){
if (input == 48) binaryMem[digitVal] = 0;
if (input == 49) binaryMem[digitVal] = 1;
if (input == 50) binaryMem[digitVal] = 2;
if (input == 51) binaryMem[digitVal] = 3;
if (input == 52) binaryMem[digitVal] = 4;
if (input == 53) binaryMem[digitVal] = 5;
if (input == 54) binaryMem[digitVal] = 6;
if (input == 55) binaryMem[digitVal] = 7;
if (input == 56) binaryMem[digitVal] = 8;
if (input == 57) binaryMem[digitVal] = 9;

/*
Serial.println(“yah”);
if (input == 48){                // 0
binaryMem[digitVal][0] = 0;
binaryMem[digitVal][1] = 0;
binaryMem[digitVal][2] = 0;
binaryMem[digitVal][3] = 0;
}

if (input == 49){                // 1
binaryMem[digitVal][0] = 1;
binaryMem[digitVal][1] = 0;
binaryMem[digitVal][2] = 0;
binaryMem[digitVal][3] = 0;
}

if (input == 50){                // 2
binaryMem[digitVal][0] = 0;
binaryMem[digitVal][1] = 1;
binaryMem[digitVal][2] = 0;
binaryMem[digitVal][3] = 0;
}

if (input == 51){                // 3
binaryMem[digitVal][0] = 1;
binaryMem[digitVal][1] = 1;
binaryMem[digitVal][2] = 0;
binaryMem[digitVal][3] = 0;
}

if (input == 52){                // 4
binaryMem[digitVal][0] = 0;
binaryMem[digitVal][1] = 0;
binaryMem[digitVal][2] = 1;
binaryMem[digitVal][3] = 0;
}

if (input == 53){                // 5
binaryMem[digitVal][0] = 1;
binaryMem[digitVal][1] = 0;
binaryMem[digitVal][2] = 1;
binaryMem[digitVal][3] = 0;
}

if (input == 54){                // 6
binaryMem[digitVal][0] = 0;
binaryMem[digitVal][1] = 1;
binaryMem[digitVal][2] = 1;
binaryMem[digitVal][3] = 0;
}

if (input == 55){                // 7
binaryMem[digitVal][0] = 1;
binaryMem[digitVal][1] = 1;
binaryMem[digitVal][2] = 1;
binaryMem[digitVal][3] = 0;
}

if (input == 56){                // 8
binaryMem[digitVal][0] = 0;
binaryMem[digitVal][1] = 0;
binaryMem[digitVal][2] = 0;
binaryMem[digitVal][3] = 1;
}

if (input == 57){                // 9
binaryMem[digitVal][0] = 1;
binaryMem[digitVal][1] = 0;
binaryMem[digitVal][2] = 0;
binaryMem[digitVal][3] = 1;
}

Serial.println(binaryMem[digitVal][2]);
*/
}

Processing Code:

/**
* Terminal client.
*/
import processing.serial.*;

Serial port;
String input = “”;
String output = “”;
int lf = 10; // ASCII linefeed

void setup() {
// Setup the screen for output.
textFont(createFont(“Verdana”, 18));
size(500, 130);
noStroke();
background(0);

// List all the available serial ports:
println(Serial.list());

// The first serial port on my mac is the Arduino so I just open that.
// Consult the output of println(Serial.list()); to figure out which you
// should be using.
port = new Serial(this, Serial.list()[0], 9600);

// Fire a serialEvent() when when a linefeed comes in to the serial port.
port.bufferUntil(lf);
port.write(lf);
}

// Buffer a string until a linefeed is encountered then send it to the serial port.
void keyPressed() {
if (key > 47 && key < 65) {
output += str(key);
if (output.length() > 3) {
print(“sending: ” + output);
port.write(output);
output = “”;
}
}

if (key == lf) {
print(“sending: ” + output);
port.write(output);
output = “”;
}
}

// Process a line of text from the serial port.
void serialEvent(Serial p) {
input = (port.readString());
print(“received: ” + input);
}

// Draw the input and ouput buffers and a little help.
void draw() {
background(0);
fill(204, 102, 0);
text(“Type a line of text to send to the serial port:”, 10, 20);
fill(255, 255, 255);
rect(10, 75, 480, 5);
text(output, 10, 55);
text(input, 10, 110);
}

Project 2: Temperature Sensor

Arduino Code:

/*
Andrea Bradshaw
Spring 2010

//thanks:: lots of inspiration taken from kelly
*/

#include <Wire.h>

// connect to:
//              analog pin 4 (SDA) – data
//              analog pin 5 (SCL) – clock

int before;
int after;

int count = 0;

int temp;
float tempCel;
float tempFar;

int address = 0×48; //100100; // old one was 88

void setup(){
Wire.begin();              // join as a master
Serial.begin(9600);
Serial.println(“Starting”);
}

void loop(){
Wire.beginTransmission(0×91);
Wire.send(0×00);
Wire.requestFrom(0×48,2);

while (Wire.available()){

if (count == 0){
before = Wire.receive();
count++;
}
else {
after = Wire.receive();
count = 0;
}
}

conversionsCel(before, after);
conversionsFar(tempCel);

Serial.print(“Celcius: “);
Serial.println(tempCel);

Serial.println();

Serial.print(“Farenheit: “);
Serial.println(tempFar);

Serial.println();

Wire.endTransmission();

delay(500);

}

void conversionsCel(byte before, byte after){
temp =  (before << 4) | ((after >> 4) & 0xFF)
tempCel = temp * 0.0625;
}

void conversionsFar(int cel){
tempFar = (cel * 9)/5 + 32;
}

Project 3: Read & Visualize Encoder

Arduino Code:

#define clckPin 5 // purple
#define dirPin  4 // orange
#define chBPin  3 // blue
#define chAPin  2 // yellow

int clckVal = 0;
int dirVal  = 0;
int chBVal  = 0;
int chAVal  = 0;

void setup(){
pinMode(clckPin, INPUT);
pinMode(dirPin,  INPUT);
pinMode(chBPin,  INPUT);
pinMode(chAPin,  INPUT);

Serial.begin(9600);
// Serial.println(“Hello World.”);
}

void loop(){
clckVal = digitalRead(clckPin);
dirVal  = digitalRead(dirPin);
chBVal  = digitalRead(chBPin);
chAVal  = digitalRead(chAPin);

Serial.print(clckVal);    // send data A
Serial.print(‘.’);        // parse data
Serial.print(dirVal);    // send data B
Serial.print(‘.’);        // parse data
Serial.print(chBVal);  // send data C, terminate with line feed
Serial.print(‘.’);        // parse data
Serial.println(chAVal);  // send data C, terminate with line feed

delay(20);

}

Processing Code:

import processing.serial.*;

PFont font;

Serial port;
int[] serialInArray = new int[4];
int serialCount = 0;

int clckVal, dirVal, chBVal, chAVal;
int yPosClck, yPosDir, yPosChB, yPosChA;
int yPosClckOld, yPosDirOld, yPosChBOld, yPosChAOld;
int yStrtClck, yStrtDir, yStrtChB, yStrtChA;

int diff = 5;
int xVal = 0;
int xValOld = -diff;

boolean reading = false;

void setup(){
size(1028, 640);
setup2();
yStrtClck = 100;
yStrtDir  = 200;
yStrtChA  = 300;
yStrtChB  = 400;

//println(Serial.list());
port = new Serial(this, Serial.list()[0]);

yPosClckOld = yStrtClck;
yPosDirOld  = yStrtDir;
yPosChBOld  = yStrtChB;
yPosChAOld  = yStrtChA;

textFont(font, 16);
stroke(255, 255, 255);
text(“Clock”, 100, 90);
text(“Dir”, 100, 190);
text(“ChA”, 100, 290);
text(“ChB”, 100, 390);
}

void draw(){
stroke(255, 255, 255);
line(xValOld, yPosChBOld, xVal, yStrtChB + yPosChB*50);

stroke(0, 0, 255);
line(xValOld, yPosChAOld, xVal, yStrtChA + yPosChA*50);

stroke(0, 255, 0);
line(xValOld, yPosDirOld, xVal, yStrtDir + yPosDir*50);

stroke(255, 0, 0);
line(xValOld, yPosClckOld, xVal, yStrtClck + yPosClck*50);

xValOld     = xVal;
yPosClckOld = yStrtClck + yPosClck * 50;
yPosDirOld  = yStrtDir  + yPosDir  * 50;
yPosChBOld  = yStrtChB  + yPosChB  * 50;
yPosChAOld  = yStrtChA  + yPosChA  * 50;

xVal+= diff;
if (xValOld > width){
xVal = 0;
xValOld = -5;
setup2();
}

}

void setup2(){

background(0);
font = loadFont(“SansSerif-48.vlw”);
textFont(font, 16);
stroke(255, 255, 255);
text(“Clock”, 100, 90);
text(“Dir”, 100, 190);
text(“ChA”, 100, 290);
text(“ChB”, 100, 390);

}

void serialEvent(Serial port){
String input = port.readStringUntil(‘\n’);
if (input != null){
input = trim(input);
println(input);
serialInArray = int(split(input, ‘.’));

yPosClck   = serialInArray[0];
yPosDir    = serialInArray[1];
yPosChB    = serialInArray[2];
yPosChA    = serialInArray[3];
}
}

  • Decided to implement logic with arduino rather than components

Solar Engine

Charge/Drain Logic

Charge/Drain Logic on Peg Board

Charge/Drain Logic Video

From PComp2

Current Charge/Drain Logic Code:

/*Andrea Bradshaw
Spring 2010
Battery Code for Project
*/

int batteryOutputPin[] = {5, 8, 10};
int batteryChargePin[] = {11, 12, 13};
//int batteryReadPin[]   = {0, 1, 2};
int batteryReadPin[]   = {2, 3, 4};
long batteryCharge[]   = {0, 0, 0};

int nowPower;
int nextPower;

int nowCharging;
int nextCharging;

long threshold_low  = .25;      //1.4;
long threshold_high = .75;      //3.4;

void setup(){

nowCharging   = 2;
nextCharging  = 0;

nowPower  = 0;
nextPower = 1;

Serial.begin(9600);
Serial.println(“Hello World.”);

for (int i = 0; i < 3; i++){
pinMode(batteryReadPin[i], INPUT);
pinMode(batteryChargePin[i], OUTPUT);
pinMode(batteryOutputPin[i], OUTPUT);

//batteryCharge[i] = analogRead(batteryReadPin[i]);
batteryCharge[i] = digitalRead(batteryReadPin[i]);
Serial.print(“batteryCharge “);
Serial.println(batteryCharge[i]);
}

}

void loop(){
//digitalWrite(batteryChargePin[nowCharging], HIGH);
//digitalWrite(batteryOutputPin[nowPower], HIGH);

// set up initially
if(batteryCharge[nowPower] > threshold_high){
digitalWrite(batteryOutputPin[nowPower], HIGH);
}
else {
digitalWrite(batteryOutputPin[nowPower], LOW);
incrementPower();
//if (nowPower = nowCharging) incrementPower();
Serial.print(“Now Power: “);
Serial.println(nowPower);
}

if(batteryCharge[nowCharging] > threshold_high){
digitalWrite(batteryChargePin[nowCharging], LOW);

incrementCharging();
//if (nowCharging = nowPower) incrementCharging();
Serial.print(“Now Charging: “);
Serial.println(nowCharging);
Serial.print(“Next Charging: “);
Serial.println(nextCharging);
}
else {
digitalWrite(batteryChargePin[nowCharging], HIGH);
}

update();
}

void incrementCharging(){
//Serial.println(“Stuck here”);
nowCharging = nextCharging;
nextCharging ++;
if (nextCharging > 2) nextCharging = 0;
}

void incrementPower(){
//Serial.println(“Stuck here”);
nowPower = nextPower;
nextPower ++;
if (nextPower > 2) nextPower = 0;
}

void update(){
//Serial.println(“HERE”);
for(int i = 0; i < 3; i++){
batteryCharge[i] = digitalRead(batteryReadPin[i]);
}
//Serial.println(“HERE2″);
}

Sleep Code

/*arduinoSleepCode
Author: Andrea Bradshaw
Spring 2010
Modified Versin of: X10 Remote Temperature Sender – V2  5/9/09 BroHogan

To maximize battery life the “Nightinggale” method of sleep and watchdog wake-up is used.
1.7ma sleep mode for 120 sec. and 84ma transmit mode for 2 sec.
With SLEEP_CYCLES = 4 (35 sec)
With SLEEP_CYCLES = 8 (2 min) 2xAA Batt last ~ 3 weeks
With SLEEP_CYCLES = 32 (6 min) 2xAA NiMH Batt last = 27 days
With all pins set to OUTPUT LOW before sleep  (test start 8/21)

*/

#include “WProgram.h”
#include <avr/sleep.h>

// macros for sleep functions
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif

#define SLEEP_CYCLES  1   // sleep cycles before awake
// sleep cycles before wake
// 8= ~2min 16= ~3min 32= 6 min delay
// PIN defines

#define LED_PIN       13

// Globals
volatile byte watchDogCount = 100;       // inc each time watchdog triggers give headstart

void setup(){
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, HIGH);           // hello world!
delay(300);
digitalWrite(LED_PIN, LOW);

// setup up type of sleep mode . . .
cbi(SMCR,SE);                         // sleep enable, power down mode
cbi(SMCR,SM0);                        // power down mode
sbi(SMCR,SM1);                        // power down mode
cbi(SMCR,SM2);                        // power down mode
setup_watchdog(9);                    // setup length of sleep mode
Serial.begin(9600);
Serial.println(“hello world!”);
}

void loop(){
if (watchDogCount >= SLEEP_CYCLES){    // wait for watchdog timeout n times
watchDogCount = 0;                   //reset

// stuff to do while awake. this is where we we read data, send data, write to SDCard
digitalWrite(LED_PIN, HIGH);         // this is just for testing

//Serial.println(“I’m awake”);       // this is just for testing
delay(3000);                         // this is just for testing
// read from sensor
// write to SD Card
// transmit using GSM

digitalWrite(LED_PIN, LOW);          // this is just for testing
system_sleep();
}
else system_sleep();
}

// Functions for Sleep mode.

void setup_watchdog(int level) { // setup length of sleep mode
// 0=16ms, 1=32ms,2=64ms,3=128ms,4=250ms,5=500ms
// 6=1 sec,7=2 sec, 8=4 sec, 9= 8sec
byte timeOut;

if (level > 9) level=9;
timeOut=level & 7;
if (level > 7) timeOut|= (1<<5);
timeOut|= (1<<WDCE);
MCUSR &= ~(1<<WDRF);
WDTCSR |= (1<<WDCE) | (1<<WDE);       // start timed sequence
WDTCSR = timeOut;                     // set new watchdog timeout value
WDTCSR |= _BV(WDIE);
}

void system_sleep() { // set system into the sleep state wake on watchdog time out
cbi(ADCSRA,ADEN);                     // switch Analog to Digitalconverter OFF
set_sleep_mode(SLEEP_MODE_PWR_DOWN);  // sleep mode is set here
sleep_enable();
sleep_mode();                         // System sleeps here
sleep_disable();                      // Continues execution here when watchdog timed out
sbi(ADCSRA,ADEN);                     // switch Analog to Digitalconverter ON
}

ISR(WDT_vect) {// Watchdog Interrupt Service is executed when  watchdog timed out
watchDogCount++;                      // inc counter
}

The User Illusion – Cutting Consciousness Down to Size Tor Norretranders

  • “Ultimately, there are only these two basic states or basic phases, and everything of interest takes place on the boundary between them: on the boundary between chaos and order, on the boundary between water and ice, on the boundary between the finite and the infinite computation process. Right where we cannot know whether it all ends or not.” (374)
  • “”The ability to reduce everything to simple fundamental laws does not imply the ability to start from those laws and reconstruct the universe.” But that is what we are consciously trying to do with the artificial lives we live in our technological civilizations.” (375)
  • “Technology is about making things predictable and repeatable so we do not need to devote so much time and attention to them. … But technology is therefore dull too. … When we are bored by technology, in a sense we are bored by our own perception of the world. … The problem is then that we simulate the world as if it consisted of straight lines and other tidy shapes.” (384)
  • “The interesting stuff lies between the completely random and the completely planned.” (392)