02 5 / 2013

Building these products has helped further my claim that a platform offering a place for collaboration on arduino projects is needed, for new comers like me to be able to get fully stuck in and feel comfortable doing so!

Arduino Equals Needs to Happen!

02 5 / 2013

I have all the pieces, I am just working on some sketches of how the wallet will actually lock. The system is in place, totally finished all the code etc, so now i need to Collaborate with a Product Designer to finish the designs! See scrapbook for  product design ideas!

02 5 / 2013

The stage i have got to with my button to do anything is that im still learning. Its going to take a little more reading/collaboration to be able to link an arduino to my bank account, or a pizza place, or whatever! 

This will most definitely be a future project!

09 4 / 2013

Wallet Control
Parts just arrived for my wallet that locks itself after its been opened. From left to right, Lithium Polymer Battery, Lipo charger basic micro usb, 2p piece for scale and an Arduino Pro Mini!
Time to work out how these pieces will all fit in a wallet, with a servo motor too!

Wallet Control

Parts just arrived for my wallet that locks itself after its been opened. From left to right, Lithium Polymer Battery, Lipo charger basic micro usb, 2p piece for scale and an Arduino Pro Mini!

Time to work out how these pieces will all fit in a wallet, with a servo motor too!

06 4 / 2013

Food Waste


I have now included a system that takes the reading from the potentiometer (how long the timer is) and indicates the amount via an LED from 1 to 7. This is now the complete code and circuitry for the food waste preventer, i just need to figure out a way to house the components.

See code below.

/////////////////////////////

#define STARTPIN 4

#define NUMOFLEDS 7

unsigned long starttimer;

unsigned long timerbegin;

unsigned long elapsedtime;

int potval;

int counterdays;

int button;

int buttonstate;

int buttoncounter;

int counter;

int i;

void setup(){

  Serial.begin(9600);

pinMode(13, OUTPUT);

Serial.begin(9600);

pinMode(5, OUTPUT);

pinMode(6, OUTPUT);

pinMode(7, OUTPUT);

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

pinMode(10, OUTPUT);

pinMode(11, OUTPUT);

}

void loop(){

          potval = analogRead(0);

          counterdays = map(potval, 0, 1023, 1, 7);

 button = analogRead(1);

 buttonstate= map(button,0,1023,10,0);

 if(buttoncounter<=0){

digitalWrite(counterdays+STARTPIN, HIGH);

if(counterdays++){

digitalWrite(counterdays+STARTPIN-1, LOW);

}

else if(counterdays—){

digitalWrite(counterdays+STARTPIN+1, LOW);

}

 }

if (buttonstate >=5){

buttoncounter ++;

}

if (buttoncounter >= 1){

  digitalWrite(5, LOW);

  digitalWrite(6, LOW);

  digitalWrite(7, LOW);

  digitalWrite(8, LOW);

  digitalWrite(9, LOW);

  digitalWrite(10, LOW);

  digitalWrite(11, LOW);

  digitalWrite(counterdays+STARTPIN, LOW);

timerbegin++;

delay(1000);

 Serial.println(timerbegin);

 if (timerbegin>= counterdays ){

   digitalWrite(13, HIGH);

 }

}

 }

05 4 / 2013

Food Waste


So this video shows that the button is fixed. I foolishly tried to use a timer from the start of the program running, which was totally not needed, all was needed is a counter, that started as soon as the button had been pressed! Problem Solved! I must stress how useful the online forums are for fixing/working out your code, amazing!

See code..

/////////////////////////////////

unsigned long starttimer;

unsigned long timerbegin;

unsigned long elapsedtime;

int potval;

int counterdays;

int button;

int buttonstate;

int buttoncounter;

int counter;

void setup(){

  Serial.begin(9600);

pinMode(11, OUTPUT);

pinMode(8, INPUT);

Serial.begin(9600);

}

void loop(){

          potval = analogRead(0);

          counterdays = map(potval, 0, 1023, 1, 7);

 button = analogRead(1);

 buttonstate= map(button,0,1023,10,0);

if (buttonstate >=5){

buttoncounter ++;

}

if (buttoncounter >= 1){

timerbegin++;

delay(1000);

 Serial.println(timerbegin);

 if (timerbegin>= counterdays ){

   digitalWrite(11, HIGH);

 }

}

 }

02 4 / 2013

Food Waste


So this is an example of the system further along, allowing you to push the button once, without holding it for the timer to start.

PROBLEM FOUND — The counter is counting from the start, not from when the button is pressed. 

Next stage is to have something physical to show the amount of time until the item is going to go off, as at the moment, you move the potentiometer, however you are not sure how long you are setting it for.

Code Below

////////////////////////////////

unsigned long starttimer;

unsigned long timerbegin;

unsigned long elapsedtime;

int potval;

int counterdays;

int button;

int buttonstate;

int buttoncounter;

int counter;

void setup(){

  Serial.begin(9600);

pinMode(11, OUTPUT);

pinMode(8, INPUT);

Serial.begin(9600);

}

void loop(){

          potval = analogRead(0);

          counterdays = map(potval, 0, 1023, 1, 7);

 button = analogRead(1);

 buttonstate= map(button,0,1023,10,0);

 starttimer = millis();

if (buttonstate >=5){

buttoncounter ++;

delay(1000);

}

if (buttoncounter >= 1){

starttimer==0;

 Serial.println(starttimer/1000);

 if (starttimer>= 1000* counterdays ){

   digitalWrite(11, HIGH);

 }

}

 }

 

02 4 / 2013

Food Waste Preventer


This is the first experiment for the food waste preventer, you set the time until the food is going to go off using the potentiometer, then you push the button and the timer counts, then the light lights up when the timer is complete. This is an initial test however it shows the system works. Need to make it so you only need to press the button once and not hold it down.

I unfortunately lost the code for this before the vimeo uploaded, as i edited the code to fix the button, see next post!

31 3 / 2013

Wallet Control


This is the next stage of how the wallet will work. When there is a current going through, the wallet will be closed, and when the wallet has been opened then closed 3 times, it will register and the wallet will lock. This system works.

Next stages is to set the lock to release after a certain amount of time, and to be able to fit the stuff into a wallet! I will speak to Daniel about what he thinks is the best way to put the tech into a wallet. I think i will hack a wallet to house the stuff, rather than building one from scratch. As this project is about the tech, not my sewing skills.

Code below:

(not print screened as its too long to fit in window)

////////////////////////////////////////////////////

#include <Servo.h>

int val;

int onoff;

int counter;

int timer;

int lock;

Servo myservo;

boolean closed;

void setup(){

 myservo.attach(13);

 pinMode(9, INPUT);

 Serial.begin(9600);

}

void loop(){

  val = analogRead(0);

 onoff = map(val, 0, 1023, 0, 10);

  Serial.println(onoff);

  closed == false;

  if (onoff >= 5 && counter== 0){

    delay(2000);

    counter++;

  }

  if (onoff <= 4 && counter == 1){

    delay(2000);

    counter ++;

  }

  if (onoff >= 5 && counter== 2){

    delay(2000);

    counter++;

  }

  if (onoff <= 4 && counter== 3){

    delay(2000);

    counter++;

  }

  if (onoff >= 5 && counter== 4){

    delay(2000);

    counter++;   

  }

  if (onoff <= 4 && counter== 5){

    delay(2000);

    counter++;   

  }

  if (counter >=6){

     closed == true;

    myservo.write(lock);

    delay(1000);

  timer ++;

  }

  if(timer >= 20 && closed == true){

closed == false;

    counter == 0;

timer == 0;

    delay(1000);

    myservo.write(lock);

  }

  if(closed ==true){

    lock++;

  }

  if(closed == false){

    lock—;

  }

}

29 3 / 2013

Wallet Control
I woke up this morning with a horrendous headache an idea how i could fix one of the problems with my previous code. This code stops the counter from counting up unless the sensor reads lower again, ie the wallet is opened again. Im sure there is another way of doing this code but for now this code works to fix the problem of the readings being taken all at the same time!

Wallet Control


I woke up this morning with a horrendous headache an idea how i could fix one of the problems with my previous code. This code stops the counter from counting up unless the sensor reads lower again, ie the wallet is opened again. Im sure there is another way of doing this code but for now this code works to fix the problem of the readings being taken all at the same time!