Recent Posts

Pages: 1 ... 8 9 [10]
Simblee For Mobile / Re: updateRect() causes Android App to Crash
« Last post by RFD_Nelson on July 24, 2017, 05:25:38 AM »
Hi AKotowski,

Can you please try changing this line:
Code: [Select]
ss = SimbleeForMobile.drawRect(80, 300, 150, 50, RED); to this:
Code: [Select]
ss = SimbleeForMobile.drawRect(80, 300, 150, 50, RED, RED);
and then removing the updateColor() line from the loop()?


Support / Erratic behaviour when connecting to device
« Last post by jetty on July 22, 2017, 11:56:43 AM »
If you're experiencing erratic behavior when connecting to the Simblee, here's something I found out the hard way.

ui(), ui_event are called from within SimbleeForMobile.process()

However SimbleeForMobile_onConnect() and SimbleeForMobile_onDisconnect are called asynchronously, presumably they're interrupts. (I couldn't find this documented anywhere).

If you're changing any variables for example in onConnect/onDisconnect, which you're also changing from loop(), you'll need to be aware they could change under you.

Also, it's common in the Simblee documentation to see this:
Code: [Select]
void SimbleeForMobile_onConnect()
  Serial.println("Mobile connected");

which will lead to random corruption of your serial stream.  It may effect other SimbleeForMobile callbacks too, I haven't verified all of them.
Simblee For Mobile / Re: updateRect() causes Android App to Crash
« Last post by AKotowski on July 20, 2017, 10:27:29 AM »
Yes, updateW() solves my problem.
The app crashes regardless of the update frequency, even if updateRect() is only called once.
Thanks for your help
Interesting Uses & Applications / Simblee Flash Read/Write wrapper library
« Last post by blieber on July 20, 2017, 09:22:11 AM »
I wrote a FIFO-ish interface to make it easy to write to and read from flash memory on Simblee -
Support / Re: dualMode for BLE+COM
« Last post by Tim on July 19, 2017, 11:15:56 PM »
I have clarity on this, thanks for replies from RF Digital support. This supplements info at:

When Simblee is connected to a BLE central and is in dualMode, it gives 10 ms slices of time to COM. This is enough time to send a COM message in LOW_LATENCY mode (3 ms latency) and receive an immediate reply from a receiving Simblee. Therefore, dualMode works only for LOW_LATENCY COM.

The only configuration of Simblees that dualMode works for is where you have one Simblee acting as a gateway, and one or more as nodes. The gateway can be connected to a BLE central and, via dualMode, also do COM messaging with one or more nodes. The nodes must use straight COM; they cannot maintain BLE connection. AND, while a COM message sent from the gateway (in between calls to its SimbleeBLE_onDualModeStart() and SimbleeBLE_onDualModeStop() routines) is broadcast to all nearby Simblees with COM stack started, only a single node can reply to the gateway, and it must do so immediately so the reply message reaches the gateway before the end of the 10 ms COM slice in which the original message was sent from the gateway.

This limits the use cases for Simblee's dualMode, but I can imagine there are many where it is very useful.

Hope helpful ...

Simblee For Mobile / Re: updateRect() causes Android App to Crash
« Last post by AKotowski on July 19, 2017, 03:54:52 PM »
Simblee For Mobile / Re: updateRect() causes Android App to Crash
« Last post by tolson on July 19, 2017, 10:40:12 AM »
Since you really just wanted to change the width of the bargraph use...

SimbleeForMobile.updateW(ss, width);
I know this works.

Also, just thought, you are updating in the loop and would seem to be at a too high rate for
the SimbleeForMobile.process();

So need to scheme how to update the bargraph at a slower rate.
Could put delay(200) after the updateW, but being in the loop that slows down response to/from phone.

So best to use a update routine using millis and millisLast examples.

Don't know why SimbleForMobile.updateRect is not working so well. Perhaps way too many things to update in the loop too often.
Don't really need it since you can update just what needs to be updated. Other than that, I suggest calling RFdigital to get their attention on the matter.

Simblee For Mobile / Re: updateRect() causes Android App to Crash
« Last post by AKotowski on July 19, 2017, 08:49:02 AM »
The offending line (36) //SimbleeForMobile.updateRect(ss, 80, 300, 150, 50);
is commented out.
Please try uncommenting that line
Bugs / Double restart when programming
« Last post by jetty on July 19, 2017, 07:05:58 AM »
When programming the device via the Arduino IDE, program is uploaded to Simblee, then the simblee starts running, then a fraction of a second later, device is reset a second time.

Operation should be just one reset.
Simblee For Mobile / Re: updateRect() causes Android App to Crash
« Last post by tolson on July 18, 2017, 07:58:51 PM »
I don't know. This works for me. If it works for you, perhaps you can do a diff.

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

uint8_t toScreen2ButtonID;

uint8_t toScreen1ButtonID;

uint8_t currentScreen;

uint8_t ss;                                                    //AK

 * Traditional Arduino setup routine
 * Initialize the SimbleeForMobile environment.
void setup() {
  // put your setup code here, to run once:
  Serial.println("Setup beginning");
  SimbleeForMobile.deviceName = "2Screens";                  //AK
  SimbleeForMobile.advertisementData = "Sample";

  //SimbleeForMobile.domain = "";         //AK // You should use your own domain
  Serial.println("Setup completed");

void loop() {
  // put your main code here, to run repeatedly:
  // process must be called in the loop for Simblee UI
  if (SimbleeForMobile.updatable && currentScreen == 1){                                   //AK
    //SimbleeForMobile.updateRect(ss, 80, 300, 150, 50);              //AK
  };                                                                 //AK

void SimbleeForMobile_onConnect()
  currentScreen = -1;

void SimbleeForMobile_onDisconnect()

void ui()
  if(SimbleeForMobile.screen == currentScreen) return;
  currentScreen = SimbleeForMobile.screen;
    case 1:
    case 2:
      Serial.print("ui: Unknown screen requested: ");

void ui_event(event_t &event)
//  printEvent(event);
  if( == toScreen1ButtonID && event.type == EVENT_RELEASE && currentScreen == 2)
  } else if( == toScreen2ButtonID && event.type == EVENT_RELEASE && currentScreen == 1)

void createScreen1()
  // Portrait mode is the default, so that isn't required
  // here, but shown for completeness. LANDSCAPE could be
  // used for that orientation.
  SimbleeForMobile.beginScreen(YELLOW, PORTRAIT);

  int textID = SimbleeForMobile.drawText(80, 60, "Screen 1", BLACK, 40);
  toScreen2ButtonID = SimbleeForMobile.drawButton(100, 200, 100, "Screen 2");

  ss = SimbleeForMobile.drawRect(80, 300, 100, 50, RED);                          //AK

  SimbleeForMobile.setEvents(toScreen2ButtonID, EVENT_RELEASE);

void createScreen2()
  // Default to Portrait orientation

  int textID = SimbleeForMobile.drawText(80, 60, "Screen 2", BLACK, 40);
  toScreen1ButtonID = SimbleeForMobile.drawButton(100, 200, 100, "Screen 1");

  SimbleeForMobile.setEvents(toScreen1ButtonID, EVENT_RELEASE);

void printEvent(event_t &event)
  Serial.print("  ID: ");
  Serial.print("   Type: ");

  Serial.print("   Value: ");
  Serial.print("   Text: ");
  Serial.print("   Coords: ");
Pages: 1 ... 8 9 [10]