Show Posts
Pages: 1 ... 30 31 [32] 33 34 ... 259
466  Using Arduino / Project Guidance / Re: Arduino touch lamp control on: July 25, 2014, 06:46:55 pm
Well, I can't say for certain it will work, because it basically a capacitance sensor. The "M" wire detects a slight voltage change, and does an action based on that change.

It only costs $5.63, so you can get one and play with it. CAUTION, it will need 110 volts to work! If this fact makes you uneasy, DON'T DO/GET IT!
467  Using Arduino / Project Guidance / Re: Arduino touch lamp control on: July 25, 2014, 06:37:05 pm
The item in the link you gave already does what you want. Look at the description,
Quote
The Dimmer switch has four ways: Low, medium, high, turn off:
Touch one time: the lamp will be in low light;
Touch again: the lamp will be in medium light;
Touch one more time: the lamp will be in high light;
Touch again: the lamp will be off.
Applicable to the metal body of table lamps, floor lamps, bedside lamps, etc.
Connection: A black line "N" and red line "L" connected to 110V input, the other black line "N" and the Blue Line "L1" connected lights, yellow line "M" then touch the metal body.

What exactly will the arduino do?

Do you want to make the arduino do what that dimmer does?, if so, then its actually very easy.
468  Using Arduino / Programming Questions / Re: Buttons and Led's - Button switching too quickly on: July 25, 2014, 06:15:21 pm
Arrays, ARRAYS... use ARRAYS

You want to have the arduino remember the last button press state, and if the state does NOT change,( high to low or low to high) then don't do anything. Only when the button changes, do something.

You may also need to debounce the buttons too.

I might have something you can use, let me look.

Code:
const byte button = 2;
boolean state, lastState = LOW;

void setup()
{
  Serial.begin(115200);
  Serial.println("Start");
  pinMode(button, INPUT);
}

void loop()
{
  state = digitalRead(button);
 
  if(state != lastState) // only do something if the button state changes, ie. not held down
  {
    lastState = state; // update lastState
    Serial.print("The buttons state is: ");
    Serial.println(state);
   
    if(state == HIGH) // do something ONLY when the buttons state is HIGH
      digitalWrite(13, !digitalRead(13) );
  }
}

469  Using Arduino / Displays / Re: Help Me - 3,5 TFT Touch LCD Screen Display - I can not make it work, help. on: July 25, 2014, 03:54:34 pm
Thats because you need a proper library that has all the functions you're looking for. You can try your luck with the UTFT and UTouch libraries provided HERE, but other then that, YOU need to make the functions yourself.

To be honest, all you really need is a way to make a pixel on the screen and be able to add color to that pixel. The rest will come afterwards.
470  Using Arduino / Displays / Re: Help Me - 3,5 TFT Touch LCD Screen Display - I can not make it work, help. on: July 25, 2014, 02:36:47 pm
But you have a working code, so now add to it. That is an third party LCD, so there may not be a library for it, which means you need to make your own functions. and/or library.

What else are you trying to do with it?
471  Using Arduino / Programming Questions / Re: Unexpected behavior with RF receiver code on: July 25, 2014, 01:48:14 pm
If anyone copies the code straight from there, it will not work. Repost the code and put it in the proper tags. Code tags
472  Using Arduino / Programming Questions / Re: How to send and recieve data via 433MHZ module on: July 25, 2014, 11:52:58 am
The answer to your question is in your link. Its a basic serial connection of which, you can use software serial.

Look at the PDF. http://www.fut-electronics.com/wp-content/plugins/fe_downloads/Uploads/Wireless-Serial-UART-Arduino.pdf
473  Using Arduino / Programming Questions / Re: How to send and recieve data via 433MHZ module on: July 25, 2014, 10:29:18 am
Do you have a link to your transmitter/receiver?
474  Using Arduino / Programming Questions / Re: Multiple buttons for State Changes - Rgb led strips on: July 23, 2014, 09:10:23 pm
You can cut down your pin usage by using shift registers and a 16-4 encoder for your buttons.
Look at these links.
http://www.instructables.com/id/64-pixel-RGB-LED-Display-Another-Arduino-Clone/

https://www.youtube.com/watch?v=QIZX8qZ6nlE


Added:
Quote
Why not just have one function and pass in the value for the denominator?
This was meant for Bulldog

Quote
code was for demonstration purposes only... a visualization of how to approach the problem
Ok, that's fair enough.
475  Using Arduino / Programming Questions / Re: Multiple buttons for State Changes - Rgb led strips on: July 23, 2014, 08:52:52 pm
Why not just have one function and pass in the value for the denominator?
476  Using Arduino / Programming Questions / Re: Unexpected behavior with RF receiver code on: July 23, 2014, 08:49:57 pm
Quote
421 > delayLeft > 0
this doesn't look correct to me. This however does, (421 > delayLeft) && (delayLeft > 0), it might not solve your entire problem, but its a start.

I'll go over the code some more.  Could you post the FULL code please?

Added:
When does bufVal get updated to the new buf value?
477  Using Arduino / Programming Questions / Re: Multiple buttons State Changes - Rgb led on: July 23, 2014, 08:46:08 pm
What is your setup, what board are you using and  what LED driver/shift register are you using? Do you have a sketch you are currently working on and can you provide us with pictures and/or a complete schematic.

Your problem sounds like it has an easy solution, but we don't know your exact hardware to be certain.
478  Using Arduino / Programming Questions / Re: Using an array in a switch case on: July 23, 2014, 08:21:40 pm
Quote
For one, the array needs to be 2D (char states[4][6], not char states[4]) to work with my previously written code.
If you had posted the previous code and said you needed them to work together, I would have given you exactly what econjack gave you.
479  Using Arduino / Audio / Re: Arduino library for WTV020-SD-16P audio module on: July 23, 2014, 04:50:36 pm
The pins used in the diagram are just examples, it's the pins in the code you want to go by. Then again, you could always changes those too, but as long as you know which pin is what (clk,data,reset and busy) you can code it to work on any combination of arduino pins. Just note, if you plan on using the serial monitor, don't have anything in digital pins 0 & 1 , otherwise you may get incorrect results.
480  Using Arduino / Audio / Re: Arduino library for WTV020-SD-16P audio module on: July 23, 2014, 03:46:50 pm
P06 is the busy pin (pin 5), it lets the arduino know when a audio file has ended.
Pages: 1 ... 30 31 [32] 33 34 ... 259