small medium large xlarge

Back to: All Forums  Arduino
Generic-user-small
15 Apr 2012, 00:50
James Dale (13 posts)

I built the circuit for the Controller.pde. I am getting the reading for the accelerometer OK but for the button I am not getting any change in the reading. It just stays at 0. I tried the button circuit on a sketch that worked for me before and it show the change. Any ideas? Thanks Jim D

Maik_schmidt_avatar2_pragsmall
15 Apr 2012, 07:33
Maik Schmidt (122 posts)

Hi James!

Did you type in the code or did you download it from the book’s web site?

What version of the Arduino IDE do you use?

It’d be helpful, if you could post a photo of your current circuit.

Cheers, Maik

Generic-user-small
15 Apr 2012, 23:47
James Dale (13 posts)

I downloaded it from the books web site. I am using the 23 release. I also tried the 1.0 release. I will try to get a picture posted

Maik_schmidt_avatar2_pragsmall
16 Apr 2012, 16:39
Maik Schmidt (122 posts)

Hi James!

It should work on Arduino 23 and on Arduino 1.0, so I guess there’s something wrong with your wiring. A picture would be really helpful.

Cheers, Maik

Generic-user-small
18 Apr 2012, 01:54
James Dale (13 posts)

I have a picture on the Arduion Yahoo group in a folder called Jim D. Do you have access ti the group. Jim

Maik_schmidt_avatar2_pragsmall
18 Apr 2012, 06:05
Maik Schmidt (122 posts)

Could you send me a link, please?

Cheers, Maik

Generic-user-small
19 Apr 2012, 02:36
James Dale (13 posts)

Here is the link to the Yahoo Arduino Group were the picture is http://groups.yahoo.com/group/arduinohome/photos/album/85788622/pic/list

Maik_schmidt_avatar2_pragsmall
19 Apr 2012, 09:51
Maik Schmidt (122 posts)

As far as I can see, there is nothing wrong with the wiring, but it looks a bit complicated. Did you try to build it exactly as it is shown in Figure 6.4?

At least I am wondering why you’re using both the 3.3V and the 5V power supply pins?

Generic-user-small
20 Apr 2012, 01:15
James Dale (13 posts)

I was using the 5 volt as a test running it to button. I did not make any difference. I am getting voltage right to digital 7 on the Auduino.

Generic-user-small
28 Jun 2012, 22:38
Jim Puls (4 posts)

I just got to this chapter. Here’s what I think is going on: Bounce sends one “1” when the switch is pressed and one “0” when it is released.

The loop is so fast, you are never going to see this. I did two things to test this.

First, put a delay(100) in the loop. Now you can see the “1”. Second, the if … else in loop prints out a “0” by default. Change it to an “x” in the else part of the loop. Now you will see a bunch of “x” characters with an occasional “1” or “0”.

The changes should be removed for use with the game.

You must be logged in to comment