I mostly use the chip Antennae as they are easy and I don’t need a long range. May for remote, get one with a connector for external antennae, but probably not necessary for me as I only use it in my office…
You then need something to plug them into as they have their specific pin pattern and they need 3.3V. The sparkfun regulated explorer is cheaper, but it can have problems with some boards as it does no voltage conversion of it’s outputs and it’s high value voltage is not high enough to register as high on some boards. The Parallax adapter does bidirectional voltage conversions, so I have had better luck.
Yep 2 of the same modules, plus probably an USB adapter. Sparkfun USB version cheapest and for most things works fine. But if you wish to reflash chip, some others make it easier to do the reset and the like.
Your shield is interesting, but if I read it right, it hard wires the XBEE to USART 0, which is same as USB (like a shield I have). Personally I like them on two different ones as you have 4 and I use both at same time…
Yep I was using a different one, bu I received 2 of the ones from elexp yesterday. Will replace the other one with one of these to standardize… Has 8 pin, for 4rows and 4 cols. to swap it in. Code is in place for reading, The only question will be which are rows and which pin is pin 1…
OK, well I put in one of the other keypads. Wiring was simple, I used 3 3wire servo extension cables. On my Mega I plugged them in one after another starting at IO pin 22. Since no shield I used the 3 pin Male/Male connectors that come with the extension cables. On the keypad side I plugged them in with IO Pin 22 going to the pin closest the 0 Pin, with the 3rd wire of 3rd cable hanging off the other side.
For Rows/Cols different than other keypad. Could rearrange wires, but instead simply updated mapping table, like:
Did some test with a “Slider” for batt.
I have started by only using a potentiometer as analog reff, since i don’t have anything yet to see batt voltage (Anyway i am on usb… lol)
[code]void InitKeypad(void) {
// Assume first four pins are the rows and the next four pins are the cols.
byte bPin;
// Init Rows
for (bPin = FIRST_KEYPAD_IOPIN; bPin < FIRST_KEYPAD_IOPIN+4; bPin++) {
pinMode(bPin, INPUT); // set all of the pins to inptu
}
// Init Cols
for (; bPin < FIRST_KEYPAD_IOPIN+8; bPin++) {
digitalWrite(bPin, HIGH); // set the in high which when input, enables PU
pinMode(bPin, INPUT); // set all of the pins to input
}
Normally, you would use open collector drivers on the rows, and have pull-ups on the columns.
So if no key was pressed, reading the four bits of the columns would give you all high (1). When a key is held down, a row and a column are connected together. when that particular row id driven low, the column line will go low. (one way).
You normally don’t want to press two or more keys at one time, although the open collector drivers can tolerate it. Adding an ‘OR’ gate to the output (column) lines can give you a “key pressed” line if desired.
Shift registers can be added to make an SPI interface, which cuts down on the pins needed for larger keyboard arrays. One can also “share” the drivers, and drive LED’s with them at the same time (simple multiplexing).
Either place is fine as we are giving and taking of ideas for both of our projects…
in my DIY remote, what I am thinking is that I would like to emulate something like what is on my phone or the like, with a small symbol that looks like a battery that is filled with the percentage, with color changing as you mention from green to red to maybe blinking… Does not have to be very large, I am thinking one text line size (12 pixel tall, maybe fit 3 on the line so leaves about 32-40 bits of area to fill, which for me I think something like 8 states would be more than enough… But I don’t use Lipos…