Go Down

Topic: help fixing my code? :) (Read 579 times) previous topic - next topic

UKHeliBob

Quote
i need all those variables
I seriously doubt that.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

camdenorrb

no its true im gonna make each one do something

camdenorrb

put back int(Serial.read() - '0'); works again :) 

UKHeliBob


no its true im gonna make each one do something
I can't wait to see the program. 
How do you know that you will need 26 integer variables and are the names significant ?  Can you give an example of using one of them, say the z variable ?
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

camdenorrb

z will probably a sound on a speaker

UKHeliBob


z will probably a sound on a speaker
Then why not give it a name like speakerNote or speakerVolume ?  What range of values do you expect the variable to hold and will the value ever be negative ?  What I am really asking is should the variable be an integer or would another data type be more appropriate ?
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

camdenorrb

dont know yet didnt get the speaker in the mail yet il add that when i get it

camdenorrb

talking about speakers ive messed arround with them but never knew how to control volume how can i do that from the java application using like o and p or something

KeithRB

You will need some extra hardware to make the arduino speak, besides a speaker that is.

camdenorrb


KeithRB

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

UKHeliBob


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

As far as I can see you are the only person that has mentioned speech in this thread.  I took the reference to a speaker to refer to a device for producing tones and by extension, music, from the Arduino, somehow involving the variable z.  I am still waiting to see what the other 25 single letter int variables will be used for.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

KeithRB

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.

Go Up