Go Down

Topic: Arduino 101 Battery charger (Read 2983 times) previous topic - next topic


Dec 28, 2015, 12:36 am Last Edit: Dec 28, 2015, 12:57 am by julienvm
Hi all,

I'm very new to Arduino. I just received the Arduino 101 and successfully made an Android controlled project (via CurieBLE) that changes RGB LED color remotely.

I'm trying to integrate a rechargeable battery. I was about to buy one of these solutions:


In the meantime, I realized that the Intel Curie chip has a Battery charging circuitry (PMIC).

Can the Curie PMIC battery charging circuitry be used? Or should I just buy one of the third-party charging boards to integrate the battery?

I need to have a working prototype really soon so timing is a factor.

Thanks for your feedback.


Hi Julien,
unfortunately, even though the Curie chip contains a battery charger, its pins are not exported to any header so you can't use them directly


Hi Julien,
Can you provide to me the sketch that you used for your LED switching. I cannot even get that far with BLE.


This sketch is placed in examples,under CurieBLE,
For reference , giving the sketch here
Code: [Select]

   Copyright (c) 2015 Intel Corporation.  All rights reserved.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#include <CurieBle.h>

BLEPeripheral blePeripheral;  // BLE Peripheral Device (the board you're programming)
BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // BLE LED Service

// BLE LED Switch Characteristic - custom 128-bit UUID, read and writable by central
BLEUnsignedCharCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);

const int ledPin = 13; // pin to use for the LED

void setup() {

  // set LED pin to output mode
  pinMode(ledPin, OUTPUT);

  // set advertised local name and service UUID:

  // add service and characteristic:

  // set the initial value for the characeristic:

  // begin advertising BLE service:

  Serial.println("BLE LED Peripheral");

void loop() {
  // listen for BLE peripherals to connect:
  BLECentral central = blePeripheral.central();

  // if a central is connected to peripheral:
  if (central) {
    Serial.print("Connected to central: ");
    // print the central's MAC address:

    // while the central is still connected to peripheral:
    while (central.connected()) {
      // if the remote device wrote to the characteristic,
      // use the value to control the LED:
      if (switchCharacteristic.written()) {
        if (switchCharacteristic.value()) {   // any value other than 0
          Serial.println("LED on");
          digitalWrite(ledPin, HIGH);         // will turn the LED on
        } else {                              // a 0 value
          Serial.println(F("LED off"));
          digitalWrite(ledPin, LOW);          // will turn the LED off

    // when the central disconnects, print it out:
    Serial.print(F("Disconnected from central: "));


Hi sivaiots14

Thanks for your reply. I still do not understand what to do. When I load this sketch I get a "connected to central"  message on my monitor and apps will connect  to the LED. I do not get any of the text strings from the sketch to show on the terminal.the terminal, not even from setup(). Cant make the LED blink. What do I do now. I am completely lost.


You need to have companion app to test  - On Windows PC, I had installed New bit BLE Tool.
On android phone, install BLE scanner app.
Then, you can see Characteristic, and send values.
Some apps send Hex.. Check the app details how to set hex.

Attaching a screenshot of Newbit tool, see the right end, where one can send values.
As per program, anything other than zero makes the LED HIGH , zero makes 13 pin to LOW.

It is working. So you can make attempt.

Go Up