Show Posts
Pages: 1 ... 52 53 [54] 55 56 ... 252
796  Using Arduino / Programming Questions / Re: XOR and XNOR operations with 2 or 3 inputs on: May 02, 2014, 06:55:10 pm
Why not make them into macros?

Code:
#define XOR(a, b) boolean(a != b ? 1 : 0)
#define XNOR(a, b) boolean(a != b ? 0 : 1)

void setup(){
Serial.begin(115200);
delay(1);
Serial.println("XOR");
Serial.println(XOR(0,0));
Serial.println(XOR(0,1));
Serial.println(XOR(1,0));
Serial.println(XOR(1,1));
Serial.println("XNOR");
Serial.println(XNOR(0,0));
Serial.println(XNOR(0,1));
Serial.println(XNOR(1,0));
Serial.println(XNOR(1,1));
}

void loop() {
 
}

For multiple inputs, you can do this XNOR(x, XNOR(y, z));
797  Using Arduino / Project Guidance / Re: Light up stairs as you walk, need sensor advice on: May 02, 2014, 05:40:06 pm
Yea, those will work perfectly.
798  Using Arduino / Project Guidance / Re: Light up stairs as you walk, need sensor advice on: May 01, 2014, 07:58:58 pm
Cheap, and non-surface altering, ok, then laser beam with a photoresistor it is.

If the beam is broken, turn on the LED.
You actually don't need an arduino for this, all you need is a simple toy laser, a photoresistor, a transistor to turn on the LED, and a power source.
799  Using Arduino / Project Guidance / Re: Light up stairs as you walk, need sensor advice on: May 01, 2014, 07:24:46 pm
15 inputs, yes it can. The Uno has the 14 digital pins (12 if you want to use the serial monitor) and the 6 analog pins, that can also be digital in/outputs.

The best way to save pins would be to use shift register for the led strips and a multiplexer for the sensors.
As far as sensors, go you can have pressure, IR or ultrasonic sensors.

What is your spending budget? Different types of sensors cost more than others and you need 15.
800  Using Arduino / Project Guidance / Re: Connecting a 4*4 keypad on: May 01, 2014, 07:06:15 pm
To be honest, it really has to do with the OP knowledge and if he is able to understand how to convert his keypad to use an analog pin. If he is unable to do so, then its better to use the standard digital method, or the method you pointed out with the 74hc922 chip.

It is quite a hassle to convert a standard keypad to a analog keypad, if you don't know what you're doing.

But now he has options to go about and solve his problem.

801  Using Arduino / Project Guidance / Re: Connecting a 4*4 keypad on: May 01, 2014, 01:11:25 pm
True, but I mean others use set resistor values, mine allows the user to choose their own, just as long as the user tells the code what values are being used. The library does all the calculations and adjusts itself accordingly.

I used 4.7K and 1K resistor values, but that's only because I had a lot of them to spare.
802  Using Arduino / Project Guidance / Re: Connecting a 4*4 keypad on: May 01, 2014, 01:07:06 pm
Yea, but it works, look at the diagram.
803  Using Arduino / Project Guidance / Re: Connecting a 4*4 keypad on: May 01, 2014, 01:05:14 pm
Why not just make a keypad that uses only one analog pin? I made a library just for those type of keypads and put it in the playground. Here is a link. OneWireKeypad

Just follow my diagram and look at my example sketches.
804  Using Arduino / Project Guidance / Re: Need help for my arduino project PLEASE ANYONE! on: April 30, 2014, 05:19:18 pm
That is correct. Ebay is much cheaper.

It only need 3 pins.
805  Using Arduino / Project Guidance / Re: computer controlled display on: April 30, 2014, 05:17:44 pm
Unless you can write a program that can extract all this data from the computer, I don't think this project is doable at this time.
806  Using Arduino / Project Guidance / Re: computer controlled display on: April 30, 2014, 05:12:00 pm
We kinda need more to go on. How will it know what music is playing, or the fan speed, or anything? What sensors are you planing on using or think you need?
807  Using Arduino / Project Guidance / Re: Need help for my arduino project PLEASE ANYONE! on: April 30, 2014, 05:09:59 pm
If you can use one, then yes, it is easier and it will work with a 5x5 grid.
808  Using Arduino / Project Guidance / Re: Need help for my arduino project PLEASE ANYONE! on: April 30, 2014, 05:00:20 pm
Shift registers usually need 3 pin, clock, data, and latch. To cascade shift registers, you have the first one connected to the 3 pins on the arduino, then the others after it will be connect to the dataOut from the previous S.R.

However if you can use  a MAX7219, then all you would need is just that one chip because a single MAX7219 can control an 8x8 grid.
809  Using Arduino / Project Guidance / Re: Need help for my arduino project PLEASE ANYONE! on: April 30, 2014, 04:24:32 pm
The LEDs, depending on the shift register(s), should only use 3 pins and the 5x5 grid will use 10 pins.
810  Development / Other Software Development / Re: New TFT Extension Library on: April 30, 2014, 03:33:40 pm
UPDATE

Keyboard functions and example sketch.

I tested the keyboard functions with RealTerm and works for portrait and landscape modes.
I may make it look better in appearance in the future, but that's for another time.

Enjoy.

ADDED: GreekFont. Drop inside UTFT folder
**If you look at the GreekFont's .c file and you see almost everything as ?, don't worry, it does the exact same thing on my end. For whatever reason, neither wordpad, notepad++, or MSword want to display the Greek symbols upon file entry. Sorry.
Pages: 1 ... 52 53 [54] 55 56 ... 252