Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - lsnyman

Pages: [1]
Simblee For Mobile / Simblee for Mobile with Bluetooth 5.0 Hardware?
« on: September 24, 2017, 05:59:56 PM »
I had my first customer tell me that Simblee for Mobile 1.1.3 is not working in his Galaxy note 8 phone which has Bluetooth 5.
Has anyone had any similar issues. He says the Simblee device appears in the list of detected simblee but as soon as he touches to select the device, it reports Simblee disconnected and does nothing.
Can RF Digital please do a test and see if Bluetooth 5 is an issue? The new iPhone 8 will also have Bluetooth 5.

The Simblee for mobile app disconnects from a running Simblee application if the app is moved to the background. This does not happen in IOS.
This is a particularly bad issue as you need to have the Simblee connected during an OTA firmware update but you need to leave the app to run nRF toolbox for example.

Please help.

Simblee For Mobile / Simblee - Draw Text function
« on: May 09, 2016, 08:56:03 PM »
Using Simblee for Mobile, I am hitting a brick wall trying to figure how to use the drawText function to send  changing lines of text to the phone, meaning the text may change depending on program execution or sensor values etc.

For reference I am using the SimbleeForMobile Temperature example which prints a changing numerical (Temp) to the screen but the text C is a constant. I want to use the same structure but also vary the Text portion.

Code: [Select]
#include <SimbleeForMobile.h>

#include "thermometer_png.h"

void setup()
  // this is the data we want to appear in the advertisement
  // (if the deviceName and advertisementData are too long to fix into the 31 byte
  // ble advertisement packet, then the advertisementData is truncated first down to
  // a single byte, then it will truncate the deviceName)
  SimbleeForMobile.advertisementData = "temp";

  // use a subdomain to create an application specific cache
  SimbleeForMobile.domain = "";

  // establish a baseline to use the cache during development to bypass uploading
  // the image each time
  SimbleeForMobile.baseline = "Oct 23 2014";

  // start SimbleeForMobile

bool first_sample;

float first_temp;
float min_temp;
float max_temp;
float temp_range;

uint8_t text;
uint8_t mercury;

// include newlib printf float support (%f used in sprintf below)
asm(".global _printf_float");

void loop()
  // sample once per second
  // todo: Simblee_ULPDelay( SECONDS(1) );

  if (SimbleeForMobile.updatable)
    // get a cpu temperature sample
    // degrees c (-128.00 to +127.00)
    // degrees f (-198.00 to +260.00)
    float temp = Simblee_temperature(CELSIUS);
    // requires newlib printf float support
    char buf[16];
    sprintf(buf, "%.02f", temp);
    // base everything on the first sample / ambient temperature
    if (first_sample)
      first_temp = temp;
      // putting your finger on the Simblee shield raises the temp approx 2 degrees
      min_temp = first_temp - 0.25;
      max_temp = first_temp + 1.0;
      temp_range = max_temp - min_temp;
      first_sample = false;

    // update the text first with the actual temp
    SimbleeForMobile.updateText(text, buf);

    // restrict temp to range
    if (temp < min_temp)
      temp = min_temp;
    if (temp > max_temp)
      temp = max_temp;

    int mercury_range = 262;
    int mercury_position = ((temp - min_temp) / temp_range) * mercury_range;

    // invert so the smallest value at the bottom
    mercury_position = mercury_range - (mercury_position);

    // update the mercury
    SimbleeForMobile.updateRect(mercury, 65, 136 + mercury_position, 33, 262 + 15 - mercury_position);

  // process must be called in the loop for SimbleeForMobile

void SimbleeForMobile_onConnect()
  first_sample = true;

void ui()
  #define  IMAGE1  1


  // \xb0 is the symbol for "degrees"
  SimbleeForMobile.drawText(280, 248, "\xb0" "C", BLUE);
  text = SimbleeForMobile.drawText(125, 240, "", BLUE, 45);

  // usable area: 56, 136, 51, 262
  // mercury area: 65, 136, 33, 262 + 15
  mercury = SimbleeForMobile.drawRect(65, 136, 33, 262 + 15, rgb(160,0,0), rgb(204,0,0));

  // hide the mercury until the image is uploaded
  SimbleeForMobile.setVisible(mercury, false);
  SimbleeForMobile.imageSource(IMAGE1, PNG, thermometer_png, thermometer_png_len); 
  SimbleeForMobile.drawImage(IMAGE1, 30, 100);
  SimbleeForMobile.setVisible(mercury, true);


void ui_event(event_t &event)

How can I make the "C" in the line
SimbleeForMobile.drawText(280, 248, "\xb0" "C", BLUE);
a string variable that can change. Meaning it may read "Cold", "Warm" or "Hot" depending on temperature.

The reference document says the function structure is
uint8_t   drawText(uint16_t   x,   uint16_t   y,   const   char   *title,   color_t   color);

Ive been staring at it too long, Any help appreciated.

Simblee For Mobile / Simblee - Stop Mobile App from going to sleep.
« on: May 08, 2016, 01:14:01 PM »
Getting started slowly with Simblee.
Is there a way to keep the Simblee for mobile App awake? I am trying to output a sensor value continuously to the app screen. O dont need the power saving features so want the app to stay alive.
Any help appreciated.

Android / Looking for someone to convert IOS app to Android
« on: February 24, 2015, 02:06:27 PM »
I have developed a product using RFduino and invested a significant amount in an IOS app that was written very well by another member. I am looking to convert this app to Android so obviously need someone who knows BLE and Android.
Please contact me if you have the relevant experience and knowledge.

Getting Started / RFduino Power Consumption with analogRead()
« on: November 19, 2014, 10:29:38 AM »
RFduino seems to have strange issues with Low Power consumption. Apart from the GZLL issues that still have no solution, I have found another that I dont seem to find the answer to.

If you perform an analogRead(), the device starts drawing more current and there seems no way to stop it.
In the below simple code, the RFDuino draws 0.33mA and if the analogRead line is commented out, consumption drops to 70nA.
I found the NRF_ADC->ENABLE lines in the wiring_analog libraries to try and turn off the ADC but they have no effect.

Does anyone know any other way to shut down the ADC or whatever internal system gets started when doing an analogRead()?

Code: [Select]
int sensorPin = 5;    // select the input pin for the potentiometer
int ledPin = 4;       // select the pin for the LED
int sensorValue = 0;  // variable to store the value coming from the sensor

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

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);

  // turn the ledPin on
  digitalWrite(ledPin, HIGH); 
  // stop the program for <sensorValue> milliseconds:
  // turn the ledPin off:       
  digitalWrite(ledPin, LOW);   
  // stop the program for for <sensorValue> milliseconds:
RFduino_ULPDelay( SECONDS(5) ); 

Getting Started / GZLL and ULPdelay()
« on: August 19, 2014, 07:57:34 PM »
The RFduinoGZLL.end(); doesn't seem to work properly. My code results in a current draw during ULPdelay() of 50uA.
Using the RFduinoGZLL with RFduino BLE example principles in my code, the current draw during ULPdelay() goes up to 430uA.
I change nothing else in my code except to add the GZLL Library, set as DEVICE=0 and add the following to the loop.

Code: [Select]
   // RFduinoGZLL.sendToHost(data);
   RFduinoGZLL.sendToHost((const char *)buf, sizeof(buf));

Any ideas?

Getting Started / Serial and I2C on the same pins does not work.
« on: August 01, 2014, 03:00:57 PM »
In V2.01 there was a problem with Serial.end() and it was fixed in V2.03 apparently, but I still have issues with using the same pins for dual purposes. In this case I am using pins 0 and 1 for I2C and for Serial, but not at the same time. However even though the commands exist for turning both ON and OFF, Serial kills the I2C.
Code: [Select]
void loop() {
  // put your main code here, to run repeatedly:



  // Disable the Serial and the Wire for low power mode

  // Switch to lower power mode until next sampling interval

  // Re-Enable the Serial and the Wire

In the above Code, I2C does 1 read and never starts again. If I remove the Serial.begin(9600) it runs fine.
Any ideas?

Getting Started / Another Library issue - ADS1114
« on: July 10, 2014, 09:45:07 PM »
You guys have been great in the past about checking library compatibility and have helped tremendously.
I was wondering if you can check one more for me?
I have 2 different I2C devices running successfully. When I added an ADS1114 ADC to the mix, the Si7021 sensor starts producing incorrect readings randomly. It functions as usual but there is randomly some kind of offset introduced, which dissappears when power is cycled but will re-appear if the humidity level (Si7021) changes.
If I remove the ADS1114 device from the sketch, then the other devices operate as expected.
Could you have a look at the library which is again an adafruit library and see if anything is not suitable for RFduino? (Attached)
This is a popular ADC and worked ok on Arduino.
I am only using it in the Single-ended, single shot mode.
So my only commnds to this library are

Code: [Select]
#include <Adafruit_ADS1015.h>
Adafruit_ADS1115 ads1115(0x48);
adc0 = ads1115.readADC_SingleEnded(0);

As you can see in the picture, the Devices at the top do not contain the code for the AD1114 and the devices at the bottom contain the ADS1114 Code, one could be correct but the other 2 read incorrectly. I have swapped the code back and forth to confirm the issue moves with the code.

Getting Started / I2C and SPI at the same time
« on: June 13, 2014, 01:16:28 AM »
I havent seen a definitive answer on this. Can you use SPI and I2c on pins 5&6 at the same time? Is there some technique to be able to do it?

Getting Started / ARM CPU Sleep Mode
« on: May 31, 2014, 11:31:07 PM »
Does the RFduino_ULPDelay() also put the Arm CPU in low power mode?
I am still drawing 1.6mA during  RFduino_ULPDelay()
What would be the method for putting this CPU in sleep mode?

Getting Started / Direction needed for project.
« on: May 04, 2014, 02:35:00 PM »
I am new to Rfduino and BLE. I have a working sketch reading a sensor.
This is what I am aiming to do and to make sure I dont proceed in the wrong direction, I wonder if someone can provide some pointers as to which direction to go and advise of any incorrect assumptions I am making.

Firstly the aim is for very low power consumption. so as for the basic sketch -
* Read sensor
* Sleep for 10 seconds to conserve power
* Read Sensor
* Etc

I am unsure of how the above will correspond with the BLE requirement.
For the BLE, I would like to only use BLE communication if a Phone attempts a connection. Once connected, the phone should display the sensor value, again this sensor value will only be updated every 10 seconds, with the RFduino sleeping in between updates - Is this possible? Can the RFduino go to sleep or some other low power mode while still remainig connected to a phone?

With no connection, Does the RFduino have to advertise itself during the read-sensor wake-up time? If so, this means that if a phone looks for RFduino in the sleep time, none will be found?

BLE questions.
I presume that I would be using the RFduino_ULPDelay() function?
Is the RFduino_pinWake() required to have a physical input on a pin, meaning a button or hardware input?

As you can see I need some guidance.
I will also be looking to pay someone to assist with writing the iPhone/Android app. If anyone is interested, contact me.

Getting Started / I2C readings dont make sense.
« on: May 02, 2014, 06:30:13 PM »
I have the following code which works on Arduino no problem reading a sensor.
I have it working on RFduino but the data coming out doesnt make any sense and is changing randomly with no change in sensor.
Is there any reason it shouldnt work?
I am suspecting it has something to do with how the 2 bytes are read and shifted left before the sensor value code is derived, but I not that confident in my knowledge of registers.
I presume long and floats are treated the same as in Arduino in RFduino?

Code: [Select]
float RHmeasure()
long readingRh = 0;

  float rhValue;
  float tempValue;
  float Tmul = 175.72;
  float Tmul2 = 46.85;
  long y = 65536L;
  // step 1: instruct sensor to read echoes
  Wire.beginOnPins(5, 6);
  Wire.beginTransmission(0x40); // transmit to device
  Wire.write(byte(0xE5));      // sets register pointer to the command register (0xE5) 
  if (Wire.endTransmission () == 0) //REQUIRED
  // step 2: wait for readings to happen
  //step 3: instruct sensor to return a particular echo reading
  Wire.beginTransmission(0x40); // transmit to device in read mode
  //step 4: request reading from sensor
  Wire.requestFrom(0x40, 2);    // request 2 bytes from slave device
  if(2 <= Wire.available())    // if two bytes were received
    readingRh =;  // receive high byte (overwrites previous reading)
    readingRh = readingRh << 8;    // shift high byte to be high 8 bits
    readingRh |=; // receive low byte as lower 8 bits
    long rawRhL = readingRh;
    Rh = ((125*rawRhL)/y)-6;



Getting Started / Problems with library
« on: April 27, 2014, 03:58:00 PM »
In battling along with using RFduino wwith existing sketches, I have a problem with the Adafruit Sharp Memory-LCD library.
It gives the following errors when compiling.
It compiles fine with UNO boards.
Can someone point out the issue?

I have attached the library
Code: [Select]
C:\Users\Leon\Documents\Arduino\libraries\Adafruit_SHARP_Memory_Display\Adafruit_SharpMem.cpp: In constructor 'Adafruit_SharpMem::Adafruit_SharpMem(uint8_t, uint8_t, uint8_t)':
C:\Users\Leon\Documents\Arduino\libraries\Adafruit_SHARP_Memory_Display\Adafruit_SharpMem.cpp:63: error: 'digitalPinToPort' was not declared in this scope
C:\Users\Leon\Documents\Arduino\libraries\Adafruit_SHARP_Memory_Display\Adafruit_SharpMem.cpp:63: error: 'portOutputRegister' was not declared in this scope
C:\Users\Leon\Documents\Arduino\libraries\Adafruit_SHARP_Memory_Display\Adafruit_SharpMem.cpp:64: error: 'digitalPinToBitMask' was not declared in this scope]

Getting Started / Why multiple Library folders in Arduino 1.5?
« on: April 27, 2014, 11:25:54 AM »
Can someone explain why there are multiple library folders in Arduino 1.5? in 1.05 there was only 1 library folder.
In 1.5 it seems there is a Library folder in the normal \Arduino\Libraries and then in the Arduino\Hardware folders there is a library folder for each variant, including RFduino.
Does this mean that you have to copy the same library to each device variant library folder?
It present I cannot even get my old UNO sketches to compile in the IDE as I dont know where to place the library folders. My sketch uses Adafruit_GFX and if I try to import it in the IDE it says the library already exists, but I cannot find it in any folders.

Pages: [1]