So our team is trying to connect a magstripe card reader to an out Electric Imp002b. We tried bit banging with a ps2 carder reader to no avail, and so now we have moved on to a USB reader; both emulate a keyboard. We tried using the following two discussions to complete this task, but I think I messed up and bought the wrong thing.
https://discourse.electricimp.com/discussion/comment/17173/#Comment_17173
https://discourse.electricimp.com/discussion/comment/15286/#Comment_15286
What I bought: https://www.sparkfun.com/products/12731
I purchased a USB to TTL (3.3V & 5V configurable) FT232RL converter breakout for using UART to read in data the magstripe reader (emulates keyboard output). However, the magstripe reader just blinks repeatably when it is hooked up (instead of being constantly on until card swiped). Also, a signal is never received when a card is swiped, so
function sayHi(){prints “hello”}
cardReader <- hardware.uart57 (also tried 1289)
cardReader.configure(blahblah, sayHi);
the code above never prints hello. We then tried polling read(), but it just returns -1. We tried troubleshooting by hooking up a keyboard in place of the card reader, and we can’t get it to work either; the keyboard lights also don’t come on when we press numlock, caps lock, etc.
So the question is, do we need a USB host like the ones mentioned in the previous posts? Can we use UART, or is SPI are only option? I was just hoping for some more details before I make another purchase. Do we have to use all the pins below? What is the minimum that we can get away with?
// MAX3421E - USB Host Shield pinouts
//
// 1 -
// 2 - MISO - SPI output
// 5 - SCLK - SPI clock
// 6 - TP1 - Test point 1 (not connected)
// 7 - MOSI - SPI input
// 8 - LED1 - Green LED
// 9 - LED2 - Green LED
// A - CS_L - SPI cable select
// B - RES_L - USB Reset
// C - INT - USB Interrupt (input)
// D -
// E - TP2 - Test point 2 (not connected)