Pages: [1] 2 3   Go Down
Author Topic: ATTiny85 tone() core?  (Read 3174 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This
http://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0022-0008.zip&can=2&q=
doesn't seem to work. Nor does this: http://code.google.com/p/arduino-tiny/
Are they just outdated, and if so can I just revert back to an older version of arduino IDE?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3953
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using the latter with v1.0.3, what is the specific problem? ... "doesn't seem to work" is a bit broad.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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

The entire ATTiny works fine. I can blink an LED. But when I use tone() with a speaker, nothing happens. I'll try it with 1.0.3 now and see if that makes a difference. (I've been using 1.0.1 up until now)
Logged

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

So I re-installed arduino as 1.0.3. Also re-installed the core you used. Built the circuit correctly. Made sure that a normal LED sketch works. (It does.) The tone() still won't work.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 198
Posts: 12747
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The tone() still won't work.

Wanna bet?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3953
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Post your code, I'll have a look and/or give it a try.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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

I doubt it's actually the code, seeing as how it's just a simple test:
Code:
void setup() {
}
void loop() {
  tone(3, 2000, 500);
  delay(500);
  tone(3, 3500, 500);
  delay(500);
}
I'm thinking something is different about the core, but I followed the readme.txt exactly... :/
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3953
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Works fine here.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 198
Posts: 12747
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Pin 3 is on the left side of the processor one down from the top.  What's connected to it?
Logged

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

The speaker (which I know works) connected to ground.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 198
Posts: 12747
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
...with a speaker...

An 8 ohm speaker?
Logged

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

No, it's a buzzer. I think it's called a piezzo buzzer. And I know it works with the tone() function on the arduino.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3953
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm. And an LED will blink on the same pin?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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

Yes.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3953
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Load the blink sketch, blink an LED on pin 3, say 100ms on and 100ms off. Once that is working, add the piezo to the circuit, from pin 3 to ground (through a small resistor, 100 ohms or so is best if you have one.)

What do you hear from the piezo?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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