Firmata over Bluetooth on Arduino? - bluetooth

I have Firmata working fine on an Arduino Uno, communicating over cable USB to Processing.
I want to get rid of the cable, and run the connection over Bluetooth transport (with a BlueSMIRF module). I am unclear on what I need to do to Firmata to tell it to use the BT module rather than the (unconnected) USB cable interface. In particular, do I need to hack Firmata itself to add initialization code which is
specific to the BT module I'm using, or
more generally, needed to tell Firmata to use a port other than the cabled USB?
Thanks
D

I am NOT very good in Firmata, but as i know, Firmata (on arduino) uses 'Serial' (pin 0 and 1, also aka as TX,RX) to communication with the Host. So, if u want to use a BT module to replace your USB cable on the arduino, hack the Firmata to use other pins, other connect the BT to pin 0 and 1.

You have to upload standard firmata with baud rate changed to 9600 inside the ino file (or test with other speed rate) and then connect BTooth TX>Rx(uno RX) and the bt RX>Tx(uno TX) as said in the previous post ,testing it with arduinoCommander worked like a charm!Arduino uno rx tx are pin0 and pin 1.also have it powered not from usb pc but external source cause having the BT ontop while on usb could mess up thing (in general disconnect the ground from BT module while uploading sketches).

All you have to do is make sure the USB is connected only when you are uploading your sketches to the arduino and then have the BlueSMIRF connected when you are ready to actually run the Arduino code. This way they will both use the default hardware serial port and you should not have to modify any code.
You could try and use SoftwareSerial.h in the Arduino to emulate another serial port but I have found that to be problematic.

Just connect Bluetooth to the Rx Tx pin and upload same standard firmata. Then pass command over bluetooth which you were passing over usb cable....it wil work.

Related

Using CC2640 As USB Bluetooth Dongle

I salvaged a CC2640 out of Bluetooth keyboard. I desoldered it in a attempt to reuse it. Can it be transformed to a USB Dongle adapter in any way? I'm doing this for knowledge, not for the outcome (It may be easier or cheaper to buy one, still want to do it)
you have to reprogram the flash (http://www.ti.com/lit/an/spraal3/spraal3.pdf). for this you can use SmartRF Flash Programmer and you need access to the pins of debug port (JTAG) or serial port (UART) and possibly there is a lock (fuse set). the OEMs often set locks to ensure that nobody reads out the code with what they programmed their devices ... if you get access to the flash of the CC2640 you can reuse it. as the CC2640 has no USB port you can only make an USB dongle of it with an external chip i.e. a FTDI chip (connect the serial port of the FTDI with the serial port of the CC2640...)

Having trouble with SPI in Arduino

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.

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).

Resources