You have 20 IO pins. By default 1 is used for the speaker (P9) and 3 others can be used for Leds/buttons(12-14), which you are probably now using for the PS2. But all of these can be disabled by removing jumpers on the board.
Great, tnx for the reply…i really have to get into the botboard and ssc32 again. Just to be clear:
Ports 0 to 15 are the numbered ports on the board? Because that’s what i am confused about anyway, if p9 is speaker is this another p9 than the numbered p9?
Indeed i disabled the buttons by removing the jumpers and i am using p12-15 for joystick and p9 for speaker to be able to use all 16 remaining ports (0-15) for sensors e.d.
Oh and while i am at it. Another question about wiring the footsensors to the botboard. In the description if found this :“Note: need wiring example for pull up resistor to an I/O pin.” So how do i wire the footsensor (the switch version) to the botboard?
Short answer from iPad. Pins 0-15 on BB2 are pins 0-15, Ax0-3 are pins 16-19. The BB2 has some default functionality for the pins I mentioned, but when the shunts are removed the additional stuff, like the support for the speaker is removed…
Yes the speaker is hooked up to the io line 9 on BB2. So if jumper is in place you probably can not use this pin.
Kurt
P.s. foot sensor should be wired with either pull up or pull down resistor. Assume pu, wire +5 throug resistor, like 10k, to signal pin. Plus wire signal pin to one side of switch and ground to other side. So set io pin to input. When you do a read, it will show high when not switched and low when it is…
Sorry, quicky…on the mandibles of the a-pod the 10k resistor is between sensor and ground. This pole of the sensor is also connected to signal. The other pole is connected to 5 v? Sorry just a check before putting the tin on it…
Foot sensor should be wired with either pull up or pull down resistor. Assume pu, wire +5 throug resistor, like 10k, to signal pin. Plus wire signal pin to one side of switch and ground to other side. So set io pin to input. When you do a read, it will show high when not switched and low when it is switched.
The wiring checks out right, but i am having a problem reading it. It is on port 4 and logic power is enabled for this bank. I am using the following code (for the left rear leg):
Note: when I mentioned the PU or PD resistor, I was assuming a switch and not an Analog device. If you are instead using some analog device, like an FSR (lynxmotion.com/p-627-force-s … istor.aspx), than the wiring and the like is different. Probably simply +5v to one side and direct to the sensor…
Also the Basic Atom Pro, can only do Analog input on 8 IO pins 0-3, 16-19 (AX0-3 marked on BB2). So in your case doing an Adin on pin 4 won’t work…
Now if you are simply using some form of switch, try changing your code, to do something like:
; in your init code...
input p4
; to sample
legLRpressed = in4
Note: With the basic it is not as easy to pass in pin number or a leg number and do a read on it… In some other code we have hacked it to do something like: