Oct
16
SoOnCon Badge Help
So, I’ve been playing around with the SoOnCon badge over the past couple weeks, but I’ve hit what I think is a problem with my board.
It started when I was looking at the code that defines the switches (SoonCon2010Badge.h) and saw this:
#define SWITCH_0 0
#define SWITCH_1 1
#define SWITCH_2 35
#define SWITCH_4 7
Yes, that’s right, the switches are numbered 0, 1, 2 and 4. A little odd, but I decided that I should investigate farther.
I wrote a test program that would check the statuses of these switches and blink the red segment of the LED on the top differently depending on which switch was depressed. I remembered hearing that the switches had internal pull-up resistors, so their normal (open) state would be high.
I set up the blinking patterns like so:
| Switch Depressed | Number of Blinks |
|---|---|
SWITCH_0 |
3 |
SWITCH_1 |
1 |
SWITCH_2 |
2 |
SWITCH_4 |
4 |
What I’ve discovered from playing with this is that the switch on the bottom left is SWITCH_1 and the switch on the bottom right is SWITCH_4. I’m assuming that the switch on the top right is SWITCH_2, but according to my program, it is continuously depressed, and SWITCH_0 (I’m assuming this to be the reset pin) is never depressed.
I suspect that this is a problem with my board rather than a problem with my code.
If there’s anyone else out there who’s been able to compile and install new firmware onto their badge, can they do me the favour of trying my code out and describing the blinking patterns they see?
The code is on github (the switch-test branch). It can be found here.
Update 2010-10-17:
This issue has been resolved. I found a patch on the original sourceforge page that I have imported into the git repository.









My mistake…I’ll update that on SourceForge when I get a chance
What exactly was the problem? I’ve since had a look at the underlying Arduino abstraction layer and it looks good.
Also… can you push it to Github? That’s where I’ve been working on it.
…or just give me a .diff file, and I’ll do it.