Show Posts
Pages: 1 2 [3] 4 5 ... 97
31  Using Arduino / Programming Questions / Re: Challenge - Number conversion using binary manipulation on: August 07, 2014, 01:33:40 pm
And assuming that "binary manipulation" means logical operators, it is difficult to do arithmetic because you have to handle all the borrowing and carrying yourself.
32  Using Arduino / Programming Questions / Re: void... on: August 06, 2014, 04:43:59 pm
Probably not a good idea to have a PAINT() and paint() function, but in paint() you have a semicolon after the if statement.
33  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 06, 2014, 02:04:16 pm
Quote
z will probably a sound on a speaker

I assumed he meant the 'z' sound.

But you are right, he doesn't need all those variables.
34  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 06, 2014, 09:56:44 am
Did you think you could just hook a speaker up to a digital pin and get speech out of an Arduino? You can get tones and music, but no speech.

You might need this:
https://www.sparkfun.com/products/11711
35  Using Arduino / Microcontrollers / Re: Please Help - Programming PIC18F2525 using Arduino on: August 05, 2014, 05:52:45 pm
Also, those threads were about programming a Pic, not compiling for it. When I asked about the Pic toolchain, he implied he did not have one, which is why I assumed he was trying to use the Arduino IDE to program the Pic, which is another thing entirely.
36  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 05:49:58 pm
You will need some extra hardware to make the arduino speak, besides a speaker that is.
37  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 04:46:25 pm
Does it work?

You set your qwer... variables to characters and then check to see if they equal 1, that can't work.
38  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 03:22:56 pm
You need to get rid of all the int(Serial.Read() - '0') and make them all just 1. And you need to clear all your alphabet characters before the next serial read.
39  Using Arduino / Programming Questions / Re: help fixing my code? :) on: August 05, 2014, 12:30:23 pm
The idiom "Serial.Read() - '0'" is used to convert an ascii code to it's numeric value. it does not say whether it was present or not.

Also, you need to serial.Read() *once* and then check it.
40  Using Arduino / General Electronics / Re: Suggestion for depth control for amplitude modulation? on: August 04, 2014, 10:57:52 am
It would replace the DAC. You are the one who asked for suggestions "perhaps in analog", not me.
41  Using Arduino / General Electronics / Re: Suggestion for depth control for amplitude modulation? on: August 04, 2014, 10:44:49 am
I used an analog multiplier chip back in college:
http://www.analog.com/en/special-linear-functions/analog-multipliersdividers/products/index.html
42  Using Arduino / Programming Questions / Re: Newb with Syntax understanding question. on: July 31, 2014, 05:21:24 pm
Code:
boolean debounce (boolean last)
{
}

Is declaring a *function* called debounce. When you call that function you must supply a boolean parameter, that will be called last when it is referred to in the function.
43  Using Arduino / General Electronics / Re: Can I have a 16 bits ADC with two 8 bits ADC? on: July 31, 2014, 02:40:27 pm
That is one reason to use the top 8 bits of the 10 bit DAC reading, you won't see any LSB 'bounce'.
44  Using Arduino / Project Guidance / Re: How to detect length of circuit? on: July 31, 2014, 01:53:52 pm
For the OP:
The best way would be to have each block have a little arduino in it that reports its size to the one below it along a common serial line.

For example:
The base sends a command saying "report your height!" If it hears nothing come back, the height is zero. If one block is there, when it gets the "report your height!" command it sends the command on up the chain. If it hears nothing, it reports its own height. If it gets a number back, it adds its height to it and sends it on back the chain.

You could also send back a string of numbers, one for each block, to know the number of blocks and the aggregate height.
45  Using Arduino / General Electronics / Re: Can I have a 16 bits ADC with two 8 bits ADC? on: July 31, 2014, 01:43:35 pm
You don't, they are totally independent. Each is hooked up from Vdd to ground with the wiper going to the analog input.

If the coarse pot is set to generate a value of 0xF0, then you can get the fine pot to generate numbers from 0x00 to 0xFF so you can get the composite 16 bit number of 0xF000 to 0xF0FF.
Pages: 1 2 [3] 4 5 ... 97