Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: IR Remote Codes Differ When I Push The Same Button?! on: September 06, 2013, 03:10:56 am
Hi heres the link to where the sketches came from;

http://www.instructables.com/id/How-to-control-your-TV-with-an-Arduino/?ALLSTEPS

I did have a brief look at the IR library, but I got the impression that the remote needed to be from a particular brand i.e (sony etc), I need it for a less well know 'Ricoh'.

If you have any generic example sketches that would be cool!

Cheers,


2  Using Arduino / Project Guidance / Re: IR Remote Codes Differ When I Push The Same Button?! on: September 05, 2013, 03:24:11 am
Thanks for the input guys.

The remote is for a projector and not universal;

http://www.ricoh.co.uk/products/projectors/high-end-projectors/pj-wx6170n.aspx

cant get my head round it?!

3  Using Arduino / Project Guidance / IR Remote Codes Differ When I Push The Same Button?! on: September 04, 2013, 09:14:56 am
Hi Everybody,

Im trying to create my own remote control,

The plan was get IR code from remote, then use IR LED to transmit that code out.


I am receiving the IR codes fine, but when I press the same button again (standby button)
all the codes change?

Is this right?

This is my first IR project so I a little unsure how IR remote work.

Hope someone can help!

Cheers,
4  Using Arduino / Programming Questions / Re: Temporarily ignore value from sensor? on: August 23, 2013, 07:02:48 am
I know your thinking 'use delay()'
but I cant because the code needs to read to the end before anything changes.

so i get;

sensor detect movement
tell image to change
delay()

}

but the image wont actually change until after the delay and i need it to change instantly.



5  Using Arduino / Programming Questions / Re: Temporarily ignore value from sensor? on: August 23, 2013, 06:21:56 am
yes pretty much,

The application will be in a window, when someone passes it will change image.

I need to ensure that once its triggered, enough time if left so they can read/look at the display with out the movement triggering the image again.

then after the predetermined amount of time the program resume to looking for movement.

I cant figure out how to get the value ignored though.
6  Using Arduino / Programming Questions / Re: Temporarily ignore value from sensor? on: August 23, 2013, 05:52:09 am
@gammon

I might not have explained what I need to do too clearly;

I need to read the input until the value gets > 50.
Once one value is registered above 50 I want all values from the pin to be ignored for 5 seconds.

@chicagodave

I've already had a little play with those but still not quite figured it out.
I keep trying and see where I get and post back.

Thanks for you input everyone
7  Using Arduino / Programming Questions / Re: Temporarily ignore value from sensor? on: August 22, 2013, 04:52:08 pm
Sorry what I posted didn't make sense, I rechecked and I think that variable was a useless piece of code I left in there.

Any suggestions on ingnoring the input from the sensor temporarily?

Regards,

Oli
8  Using Arduino / Programming Questions / Re: Temporarily ignore value from sensor? on: August 22, 2013, 06:32:57 am
Hi thanks for the reply

Code:
//counter increment
  int inc = 1;

//is related to this, its scrolls through the available images

// draws the image at the currently index of PImage[]
  image(images[counter], width/2, height/2);


9  Using Arduino / Programming Questions / Re: Temporarily ignore value from sensor? on: August 22, 2013, 06:21:19 am
Sorry, is this better? (see above)
10  Using Arduino / Programming Questions / Re: Temporarily ignore value from sensor? on: August 22, 2013, 06:20:45 am

Hi Everyone,

I am using a parallax x-band sensor to detect movement and change an image displayed.

Its all working fine but I now need to refine it;

What I need to do is once the motion is detected I want the program to ignore the values from the sensor for a certain amount of time, to prevent the images changing rapidly.

Im just struggling with the code on this one!

its done in processing with the Arduino library, ill post the code so you can see but it will most likely be a nuisance for anyone to run it!

hope someone can help!

---------------------------------

Code:
import processing.serial.*;
import cc.arduino.*;

Arduino arduino;

//put image names in here ready to be loaded in to array
String[] imageNames = {
  "cheerful.jpeg", "cool.jpeg", "chatterbox.jpeg", "fussy.jpeg"
};

//creates an image array with the amount of field specified by String[] 
PImage[] images = new PImage[imageNames.length];

// counter to select picture
int counter = 0;


int ledPin = 13;


void setup() {
  size(500, 500);
  background(255);
  strokeWeight(5);
  imageMode(CENTER);

  arduino = new Arduino(this, Arduino.list()[11], 57600);
 
  // set pin numbers for each input/output
int sensorDigitalPin = 2;
int sensorAnalogPin = 0;

  // declared the pin mode for each pin
  arduino.pinMode(sensorDigitalPin, arduino.INPUT);
  arduino.pinMode(sensorAnalogPin, arduino.INPUT);
  arduino.pinMode(ledPin, arduino.OUTPUT);

  //loads the images names from String[] in to PImage[] in order
  for (int i=0; i < imageNames.length; i++) {
    String imageName = imageNames[i];
    images[i] = loadImage(imageName);
  }

  //counter increment
  int inc = 1;
}


void draw() {

  int digitalReading = arduino.digitalRead(2);
  int analogReading = arduino.analogRead(0);


  println(digitalReading);
  println(analogReading);

  // draws the image at the currently index of PImage[]
  image(images[counter], width/2, height/2);

  if (analogReading > 50) {
    counter ++;
    arduino.digitalWrite(ledPin, arduino.HIGH);
    delay(1000);
    arduino.digitalWrite(ledPin, arduino.LOW);

    if (counter > 3) {
      counter = 0;
    }
  }
}



[/quote]
11  Using Arduino / Programming Questions / Temporarily ignore value from sensor? on: August 22, 2013, 05:44:18 am
Hi Everyone,

I am using a parallax x-band sensor to detect movement and change an image displayed.

Its all working fine but I now need to refine it;

What I need to do is once the motion is detected I want the program to ignore the values from the sensor for a certain amount of time, to prevent the images changing rapidly.

Im just struggling with the code on this one!

its done in processing with the Arduino library, ill post the code so you can see but it will most likely be a nuisance for anyone to run it!

hope someone can help!

---------------------------------

Code:
import processing.serial.*;
import cc.arduino.*;

Arduino arduino;

//put image names in here ready to be loaded in to array
String[] imageNames = {
  "cheerful.jpeg", "cool.jpeg", "chatterbox.jpeg", "fussy.jpeg"
};

//creates an image array with the amount of field specified by String[] 
PImage[] images = new PImage[imageNames.length];

// counter to select picture
int counter = 0;


int ledPin = 13;


void setup() {
  size(500, 500);
  background(255);
  strokeWeight(5);
  imageMode(CENTER);

  arduino = new Arduino(this, Arduino.list()[11], 57600);
 
  // set pin numbers for each input/output
int sensorDigitalPin = 2;
int sensorAnalogPin = 0;

  // declared the pin mode for each pin
  arduino.pinMode(sensorDigitalPin, arduino.INPUT);
  arduino.pinMode(sensorAnalogPin, arduino.INPUT);
  arduino.pinMode(ledPin, arduino.OUTPUT);

  //loads the images names from String[] in to PImage[] in order
  for (int i=0; i < imageNames.length; i++) {
    String imageName = imageNames[i];
    images[i] = loadImage(imageName);
  }

  //counter increment
  int inc = 1;
}


void draw() {

  int digitalReading = arduino.digitalRead(2);
  int analogReading = arduino.analogRead(0);


  println(digitalReading);
  println(analogReading);

  // draws the image at the currently index of PImage[]
  image(images[counter], width/2, height/2);

  if (analogReading > 50) {
    counter ++;
    arduino.digitalWrite(ledPin, arduino.HIGH);
    delay(1000);
    arduino.digitalWrite(ledPin, arduino.LOW);

    if (counter > 3) {
      counter = 0;
    }
  }
}


12  Using Arduino / Installation & Troubleshooting / Arduino and Processing 2 on: August 15, 2013, 05:31:09 am
Hi Everyone,

I have installed the this Arduino library for Processing (Im using v2.0.1) but get this error message when I try to use the examples;

-------------------------------

import processing.serial.*;

import cc.arduino.*;

Arduino arduino;

void setup() {
  size(512, 200);
  arduino = new Arduino(this, Arduino.list()[0], 57600);  <----------------- ERROR LINE
}

void draw() {
  background(constrain(mouseX / 2, 0, 255));
  arduino.analogWrite(9, constrain(mouseX / 2, 0, 255));
  arduino.analogWrite(11, constrain(255 - mouseX / 2, 0, 255));
}

---------------------------------

ERROR MESSAGE

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
RXTX Warning:  Removing stale lock file. /var/lock/LK.047.033.000
gnu.io.PortInUseException: Unknown Application
   at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
   at processing.serial.Serial.<init>(Unknown Source)
   at processing.serial.Serial.<init>(Unknown Source)
   at cc.arduino.Arduino.<init>(Arduino.java:166)
   at arduino_input.setup(arduino_input.java:31)
   at processing.core.PApplet.handleDraw(PApplet.java:2245)
   at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)
   at processing.core.PApplet.run(PApplet.java:2141)
   at java.lang.Thread.run(Thread.java:680)

I see this has been discussed on other forums but I have followed the suggestions but still no joy.

Just wondered if anyone had any new info on this?

Regards,

Oli
13  Using Arduino / Motors, Mechanics, and Power / Re: Making a Perfume Bottle Spray with Arduino! on: April 11, 2013, 03:04:30 am
Thanks for you input guys, I think i'm going to try the sevro idea first seen how i get on!

will post back with results,

Regards,

Oli
14  Using Arduino / Motors, Mechanics, and Power / Making a Perfume Bottle Spray with Arduino! on: April 10, 2013, 07:29:56 am
Hi everyone,

I have not idea how to go about doing this but......

what i need to do is make a perfume bottle (atomiser) spray when it senses motion.

The motion sensing i will do via Max/Msp or a motion sensor straight into Arduino.

I would love to hear some suggestions on how to get this done?

Regards,

Oli
15  Using Arduino / Interfacing w/ Software on the Computer / Re: Getting Text Message Data From Arduino to Max on: March 20, 2013, 11:47:02 am
Hi thanks for the reply,

The title does say 'text message data' meaning from a mobile phone, probably should have explain it more clearly.

do you have any ideas? I have had a little look at the GSM shield but as I said previously Im a little unclear if i can send messages to it from another phone?

Regards,

Oli






















































Pages: [1] 2