When you say "flashing in pairs" do you mean like here: http://mbed.co.uk/handbook/DebuggingGettingStarted
I checked your programm and it seems that the bug is that the BusOut API has changed too.
That means if you look here http://mbed.co.uk/projects/libraries/svn/mbed/trunk/BusOut.h you can see that there are 2 constructors for the BusOut class:
- The first one thakes up to 17 arguments, a list of pinns and a name. If not all arguments are given the nongiven pins will be set to NOT_CONNECTED and the name to "".
- The second constructer demands an array of int with 16 values each a pin number or NOT_CONNECTED
In your progam you uses the second one.
It should work if you change:
int pins[] = {21, 22, 23, 24, 25, 26, 27, 28};
to
int pins[] = {21, 22, 23, 24, 25, 26, 27, 28, NOT_CONNECTED, NOT_CONNECTED, NOT_CONNECTED, NOT_CONNECTED, NOT_CONNECTED, NOT_CONNECTED, NOT_CONNECTED, NOT_CONNECTED};
or if you use the other constructor:
Change
int pins[] = {21, 22, 23, 24, 25, 26, 27, 28};
BusOut Seg7(pins);
to
BusOut Seg7(21, 22, 23, 24, 25, 26, 27, 28);
best regards,
Rolf Meyer
Hi there,
I work in the IT dept. Netherhall School and was given an mbed to play with by Ali Wells who I believe met up with some of you a few weeks back. I've been playing for a while so didn't think I would suit the first 5 minutes thread but I could do with some help in getting the Digital Dice example in the Cookbook working if anybody can help?
We have built a circuit with the mbed, 7seg display and triple axis accelerometer on a breadboard that matches the example photo as closely as possible (although i've had to use different pins as my mbed chip is different). I've used the code given with the pin numbers changed and BusOut to make it compile but the output results are completely wrong.
I'm using analog inputs 15, 16, 17 and Bus outputs 21-28 but the results just light up all 7 segments and the dp on the display with the onboard LEDs flashing in pairs.
Any idea where I've gone wrong? I'm not experienced in C programming at all so all help and/or criticism welcome!
thanks,
Joe Kitchen
ICT - Netherhall School