Pages: 1 2 [3]   Go Down
Author Topic: help fixing my code? :)  (Read 458 times)
0 Members and 1 Guest are viewing this topic.
East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4239
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i need all those variables
I seriously doubt that.
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

no its true im gonna make each one do something
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4239
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

z will probably a sound on a speaker
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4239
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Edison Member
*
Karma: 33
Posts: 1435
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what hardware?
Logged

Offline Offline
Edison Member
*
Karma: 33
Posts: 1435
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4239
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Edison Member
*
Karma: 33
Posts: 1435
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: 1 2 [3]   Go Up
Jump to: