Having trouble with SPI in Arduino - bluetooth

I have a project where I am trying to use the adxl345 as a pedometer and it is hooked up to an Arduino where it will count steps.I also have a bluetooth device from Adafruit (nrf8001) that is hooked up to an Arduino.
I want to the Arduino to send the steps via bluetooth to an smart phone. The problem I am currently at is the Arduino can only use either the adxl345 or the nrf8001. I cannot have both using SPI communication. I know that SPI can have multiple devices attached to it using chip select. I am using slave select but I don't know why it is not working. According to Adafruit they use their own special SPI communication that not only uses chip select but also a reset and interrupt.

Read following page.
https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout/pinouts
It's REQ pin is considered as chip select.

Related

Interfacing pySerial (3.4) with some uart to usb converters

I'm using pyserial to get data from a psoc device (microcontroller). the microcontroller sends data via uart and an internal (inside psoc) uart to usb is used to convert data from uart to usb, however I have communication flow issues. I tried to use an external ftdi uart/usb converter but I'm still facing the same problem.
As a non suitable solution, I used an arduino mega board between my psoc and laptop, it receives data via uart and send them via usb to my laptop, it works without any data flow issue.
Can you help me to solve this issue?
thanks :)

Communicate microcontroller with smartphone via bluetooth

I need do communicate atmega88 with a smartphone via bluetooth using a bluetooth HC-05 module. The problem is that all my atmega pins are being used. Rxd and txd pins are being used by a keypad (Keypad at PORTD). My project is almost done, at this stage i don't want to change the micro. Is there any alternative to solve this problem? Thanks
You can use Software serial library for that controller. But it is better to connect HC-05 module to default UART pins.

How to use APC220 Radio Communication Module in raspberry pi

I am developing a project using Arduino to send a message to Raspberry Pi using an APC220 Radio Communication Module.
The Raspberry Pi can't receive serial message by using USB connect to APC220. I want to know how to use APC220 in Raspberry Pi?
The APC220 has a TTL UART interface which you can connect directly to the RPi TTL UART pins on the GPIO header - you do not need the USB-Serial converter (though that should work too if it is a standard CDC/ACM device - though this suggests that there may be issues).
A note of caution however, the RPi GPIO pins use 3.3Volt logic, the APC220 datasheet is not clear on the TTL level used, but the specified supply range is 3.3 to 5.5 volts so it seems likely that it is 3.3V - best measure it to be certain. You can probably use the RPi GPIO headers's 3.3V supply pin to power the ACM220, then you will be sure to be safe. If the ACM220 level is too high, the quick-and-dirty solution is to use current limiting resistors in-line to protect the RPi (10KOhm should be enough, but don't hold me responsible; you should know what you are doing before proceeding).
The UART device on the Pi is /dev/ttyAMA0.
See here for details of serial I/O on the Pi.
22 Feb 2012 Update
The discussion here suggests that to make the TTL<->USB adapter work on Raspberry Pi, you need to disconnect the EN signal - the discussion links back to the manufacturer documentation, which gives that advice in the troubleshooting section. Since that makes the device appear as a USB serial, and you won't have to reconfigure the on-chip serial or build a connector that may be simpler.

How USB to Bluetooth DTR/RTS work?

A number of bluetooth Arduino shields (Bluefruit EZ-link, SparkFun Bluetooth Silver) support DTR/RTS and have special out pin to wire. How do they work? Does it require special drivers (linux f.e.)? Can any bluetooth receiver be used or modified to provide DTR/RTS? Since setting DTR/RTS is vendor-specific does it depend on transmitter side or receiver (bluetooth shield) only?
The only idea is that special USB drivers needed that send special AT commands to make BT receiver know actual DTR/RTS value.
The documentation of Bluetooth SPP (https://developer.bluetooth.org/TechnologyOverview/Documents/SPP_SPEC.pdf) states in section 4.1 RS232 Control Signals that "all devices are required to send information on all changes in RS232 control signals".
And since Bluefruit EZ-link is not using any special drivers on the side of the computer, it must be that the standard BT virtual serial port drivers that manage the ports created for the BT connection to Arduino handle the control signals properly and send them over to the BT shield connected to Arduino. Hence no work should be needed on the side of the computer, and it only depends on the receiver: whether it has the control signals accessible on any of the output pins and operates them as it should, or not (as usually is the case, unfortunately).

Can I connect 2 RFID card readers to one arduino?

I am looking for connecting to ADAFRUIT RFID PN532 readers to one arduino,
I think its possible since I2C was for that, but how can i modify the code (Which is already in RFID ADAFRUIT LIBRARY) two access through the both readers at one instance ?
No, you can't connect two Adafruit PN532 shields on the same I2C bus. The problem is that you can't change the peripheral address of the PN532. Thus, both PN532 NFC chips would respond to the same address and you can't control which of the two shields you communicate with.
However, you may be able to separate the two boards
by using an I2C multiplexer that switches between the two boards, or
by using the SPI option of the PN532 shields. In SPI mode you have an additional chip-select PIN that you could wire to separate PINs of the Adruino. You could then address a specific PN532 shield using those chip-select lines. However, you would need to port the PN532 library to SPI communication.

Resources