|
|
Grand Blanc, MI, USA
Offline
Edison Member
Karma: 43
Posts: 2480
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #1 on: January 21, 2013, 09:06:43 pm » |
I'm using the latter with v1.0.3, what is the specific problem? ... "doesn't seem to work" is a bit broad.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 11
|
 |
« Reply #2 on: January 21, 2013, 09:09:59 pm » |
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
Newbie
Karma: 0
Posts: 11
|
 |
« Reply #3 on: January 21, 2013, 09:20:07 pm » |
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
Online
Shannon Member
Karma: 116
Posts: 10136
|
 |
« Reply #4 on: January 21, 2013, 09:21:20 pm » |
The tone() still won't work. Wanna bet?
|
|
|
|
|
Logged
|
|
|
|
|
Grand Blanc, MI, USA
Offline
Edison Member
Karma: 43
Posts: 2480
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #5 on: January 21, 2013, 09:22:00 pm » |
Post your code, I'll have a look and/or give it a try.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 11
|
 |
« Reply #6 on: January 21, 2013, 09:33:14 pm » |
I doubt it's actually the code, seeing as how it's just a simple test: 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
Edison Member
Karma: 43
Posts: 2480
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #7 on: January 21, 2013, 09:37:32 pm » |
Works fine here.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Online
Shannon Member
Karma: 116
Posts: 10136
|
 |
« Reply #8 on: January 21, 2013, 09:40:22 pm » |
Pin 3 is on the left side of the processor one down from the top. What's connected to it?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 11
|
 |
« Reply #9 on: January 21, 2013, 09:40:56 pm » |
The speaker (which I know works) connected to ground.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Online
Shannon Member
Karma: 116
Posts: 10136
|
 |
« Reply #10 on: January 21, 2013, 09:41:07 pm » |
...with a speaker... An 8 ohm speaker?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 11
|
 |
« Reply #11 on: January 21, 2013, 09:46:07 pm » |
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
Edison Member
Karma: 43
Posts: 2480
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #12 on: January 21, 2013, 09:48:30 pm » |
Hmm. And an LED will blink on the same pin?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 11
|
 |
« Reply #13 on: January 21, 2013, 09:48:46 pm » |
Yes.
|
|
|
|
|
Logged
|
|
|
|
|
Grand Blanc, MI, USA
Offline
Edison Member
Karma: 43
Posts: 2480
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #14 on: January 21, 2013, 09:52:10 pm » |
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
|
|
|
|
|
|