Using I/O pins BBB

OK trying to post again, this morning’s post seemed to have gone nowhere.

I’m trying out the push button/led example using node.js and Bonescripts, successfully modified it to use 6 I/O pins ORed together so that if any pin is active the LED comes on.

The issue I’m having is that not all pins seem to be accessible and the script fail. ie P8_3, P8_40 and others.

Is this to do with the default power up boot mode which makes some pins not user accessible? Do we know which mode the board wakes up in (MODE0-MODE7)?

Masochistically I’m using nano as the editor not knowing better and I feel I have gone back in time 30 years. :slight_smile: But it makes me feel young(er ) again.

This is now a double post, don’t know if It can be deleted or locked
Other thread here https://groups.google.com/forum/#!category-topic/beagleboard/newbies/BLbSy-tO_V0

This is now a double post, don’t know if It can be deleted or locked
Other thread here https://groups.google.com/forum/#!category-topic/beagleboard/newbies/BLbSy-tO_V0

If its doesnt work what does successfully modified mean?

Did you check what gpio pins are being used by board HW and cant be toggled

If its doesnt work what does successfully modified mean?

Thanks for replying,

Successfully means that the code WORKS with the pins I’m using but I can’t access other pins like the ones above and possibly others.
I have a cape with 48 inputs, so far I have 7 pins accessible, haven’t tried many of the others yet.

Did you check what gpio pins are being used by board HW and cant be toggled

That’s what I’m trying to find out, which of the 8 modes (MODE0 to MODE7) does the boards wake up in so that I can see which pins are useable?
The board is new and logging in as root.

Someone else will be writing the final code (and he is likely to read this… :slight_smile: ) and he knows what he is doing. I’m just messing around and trying to test the cape I have designed and built according to some pin out provided. These are the same pins used in the ledscape project AFAIK.

So it is possible that the board need to be switched to another mode in order to use those pins fully and maybe I should give up while I’m sort of ahead. :slight_smile:

Just in case anyone else comes up with the same issue I’m posting a list of pins which can be used without doing anything special, the pins commented out cannot be used without some (yet to discovered) incantation, mostly see to be assigned to a LCD cape??

//CON 1
b.pinMode(‘P9_13’, b.INPUT); // GPIO0-31
b.pinMode(‘P9_11’, b.INPUT); // GPIO0-30
b.pinMode(‘P9_12’, b.INPUT); // GPIO1-28
b.pinMode(‘P9_16’, b.INPUT); // GPIO1-19
b.pinMode(‘P9_14’, b.INPUT); // GPIO1-18
b.pinMode(‘P9_15’, b.INPUT); // GPIO1-16

//CON 2
b.pinMode(‘P9_30’, b.INPUT); // GPIO3-16
// b.pinMode(‘P9_28’, b.INPUT); // GPIO3-17
b.pinMode(‘P9_21’, b.INPUT); // GPIO0-3
b.pinMode(‘P9_26’, b.INPUT); // GPIO0-14
b.pinMode(‘P9_22’, b.INPUT); // GPIO0-2
b.pinMode(‘P9_23’, b.INPUT); // GPIO1-17

//CON 3
// b.pinMode(‘P9_31’, b.INPUT); // GPIO3-14
// b.pinMode(‘P9_29’, b.INPUT); // GPIO3-15
b.pinMode(‘P9_41’, b.INPUT); // GPIO0-20
// b.pinMode(‘P8_33’, b.INPUT); // GPIO0-9
b.pinMode(‘P9_42’, b.INPUT); // GPIO0-7
// b.pinMode(‘P8_31’, b.INPUT); // GPIO0-10

//CON 4
// b.pinMode(‘P8_41’, b.INPUT); // GPIO2-10
// b.pinMode(‘P8_43’, b.INPUT); // GPIO2-8
// b.pinMode(‘P8_35’, b.INPUT); // GPIO0-8
// b.pinMode(‘P8_45’, b.INPUT); // GPIO2-6
// b.pinMode(‘P8_37’, b.INPUT); // GPIO2-14
// b.pinMode(‘P8_39’, b.INPUT); // GPIO2-12

//CON 5
b.pinMode(‘P8_7’, b.INPUT); // GPIO2-2
b.pinMode(‘P8_8’, b.INPUT); // GPIO2-3
b.pinMode(‘P8_9’, b.INPUT); // GPIO2-5
b.pinMode(‘P8_10’, b.INPUT); // GPIO2-4
b.pinMode(‘P8_11’, b.INPUT); // GPIO1-13
b.pinMode(‘P8_12’, b.INPUT); // GPIO1-12

//CON 6
b.pinMode(‘P8_18’, b.INPUT); // GPIO2-1
b.pinMode(‘P8_17’, b.INPUT); // GPIO0-27
b.pinMode(‘P8_13’, b.INPUT); // GPIO0-23
b.pinMode(‘P8_16’, b.INPUT); // GPIO1-14
b.pinMode(‘P8_14’, b.INPUT); // GPIO0-26
b.pinMode(‘P8_15’, b.INPUT); // GPIO1-15

//CON 7
// b.pinMode(‘P8_27’, b.INPUT); // GPIO2-22
//** b.pinMode(‘P8_19’, b.INPUT); // GPIO0-22 **OK used for output for test
// b.pinMode(‘P8_29’, b.INPUT); // GPIO2-23
// b.pinMode(‘P8_34’, b.INPUT); // GPIO2-17
// b.pinMode(‘P8_30’, b.INPUT); // GPIO2-25
// b.pinMode(‘P8_32’, b.INPUT); // GPIO0-11

//CON 8
// b.pinMode(‘P8_46’, b.INPUT); // GPIO2-7
// b.pinMode(‘P8_44’, b.INPUT); // GPIO2-9
// b.pinMode(‘P8_36’, b.INPUT); // GPIO2-16
// b.pinMode(‘P8_42’, b.INPUT); // GPIO2-11
// b.pinMode(‘P8_38’, b.INPUT); // GPIO2-15
// b.pinMode(‘P8_40’, b.INPUT); // GPIO2-13

hmm does the code button work?