RFduino OSX Example

I made a simple app that let you chat between the RFduino BLE development platform and Macbook. This is my first project in Cocoa programming. It helped me to understand the mechanisms behind CoreBluetooth and how to interface with the RFduino. Maybe it is helpful for you as a reference on developing for the RFduino and CoreBluetooth.

> check out the project on github

This software is based on Apple Developer’s Heart Rate Monitor Example. I have not incorporated recent changes in CoreBluetooth (iOS7). Also interesting, this tutorial by the RFduino Team shows how to use the Nordic SDK with RFduino.

Screen Shot 2015-12-09 at 7.37.39 PM.pngScreen Shot 2015-12-09 at 7.44.58 PM.png


pressure sensor + arduino + processing signal analysis

Use arduino and processing to view sensor input from two FSRs.





1) install Arduino: follow the instructions here

2) upload the following code

int sensorPin_front = A0; // A0 is the input pin for front fsr
int sensorPin_back = A1; // A1 is the input pin for back fsr

int sensorValue_front = 0; // variable to store the value coming from the sensor
int sensorValue_back = 0;

void setup() {
// initialize serial:
// declare the ledPin as an OUTPUT:
pinMode(ledPin, OUTPUT);

void loop() {
// read the value from the sensor:
sensorValue_front = analogRead(sensorPin_front);
sensorValue_back = analogRead(sensorPin_back);

//send over serial
Serial.write( 0xff); //control byte
Serial.write( (sensorValue_front >> 8) & 0xff); //first byte
Serial.write( sensorValue_front & 0xff); //second byte
Serial.write( 0xfe);
Serial.write( (sensorValue_back >> 8) & 0xff);
Serial.write( sensorValue_back & 0xff);

or download file here 

3) install Processing from here

4) I used this example and modified the code for this purpose. download modified code here. Change the com port to the com port that the arduino is connected to.

5) if pressure is applied you should see the following

Teensy and XBee

In this article I am going to describe how to set up an RF wireless network with XBee modules and the Teensy USB development board.

Teensy is a fairly well documented and easy to use development board. In this example I am using Teensy 2.0. Two good things about Teensy are that it has an USB serial port and an additional serial port that supports UART. This way you can easily connect Teensy to the XBee module using serial connection and still be able to debug and communicate with Teensy using the USB serial port. Another good thing about Teensy is that you can use a simple hardware modification to make it run with 3.3V, which is the supply voltage for the XBee module.

you can follow these instructions to get started with Teensy and then follow this instruction to setup Teensyduino, which let you easily program Teensy using the Arduino platform and Arduino libraries.

There are two XBee operation modes, transparent operation and API operation. Transparent Operation is easier to get started with, it acts as a replacement of the serial communication. You set a fix destination address, this means that this XBee modul will only talk to the XBee module in its network that has this specific destination address as my address. You can also broadcast to every module in the network by setting the destination address to ffff.  When the module receives an RF packet, the data is sent out the DO pin with no additional information. API operation requires that communication with the module be done through a structured interface. Using API operation you are able to transmit data to multiple destinations without entering Command mode, get receive success and failure status, and identify the source address of the received package. The different package structures can be found in the data sheet 3.4.1 API Frame Specifications. We are using Series 1 XBee modules.

XBee Seris 1 datasheet

Continue reading