Hi guys,
This is probably a simple question but I can't seem to find much info online. I'm trying to interface my ATMega328 with both a separate IC (ELM327) and a some sort of bluetooth module to receive commands wire free. Basically data flow will be: mobile bluetooth -> bluetooth module -> ATMega328 -> ELM327 and back.
So, I know the bluetooth module will need to be wired to the Tx and Rx pins on my ATMega, but I'll also need those pins to pass data on to the ELM327. Is it possible to use other digital pins to transmit and receive serial data? If not, does anyone have any ideas as to how I could accomplish this connection?
On a side note, any recommendations for a good bluetooth module?
Thanks for the help!
You can use a software serial library to support a additional serial device on any digital pins:
http://arduiniana.org/libraries/newsoftserial/
Lefty
You can use New software serial to create the Rx/Tx function on other pins.
Use it for the part with the slower data rate.
Any chance you can bluetooth via SPI or I2C?
You can also find SPI to RS232 chip from maxim-ic.com
Great! Thanks for the quick and helpful replies.
I don't think I2C would be a possibility because this project is for a senior design class and we aren't allowed to use pre-made boards. All of the circuits we use have to be on our own PCBs, unfortunately, otherwise we would probably just use an Arduino BT. We're still unsure how we're going to get the module on the same PCB as the ATMega.
I don't think I2C would be a possibility because this project is for a senior design class and we aren't allowed to use pre-made boards.
Why can you not make an I2C board yourself? It is just like any other board, there is no need for it to be pre-made.