Using Bluetooth LE to create a connected night lamp

Hi !

This is my first post on this forum, I'm a very beginner with arduino and would like to have some advices for my school project.
I have to create a connected night lamp. Using an iPad I want to send data to the arduino so that I can create different light atmospheres. For example in one case the light will be red, in another case it will be blue...

To make the communication possible with the iOS app and the arduino, I may use a Bluetooth LE shield (I've found this one : http://redbearlab.com/bleshield/). My question is : what kind of data can I send with this shield ? (Strings, arrays, chars ... ?). Honestly I don't know if the BLE technology is the best solution, I would like to have some advices before I buy the shield...
(I will use an arduino Leonardo).

Thank you in advance for any answer.

@kaymorey:

Hi!!

I presume this would be so what an ambient light right?
how about you break down the project first into smaller chucks for instant

the check list below would be how i would do it or i would make my employee do it but you may change it according to your preference:

  1. create a mood light
    -RGB led, arduino and 3 potentiometer
  2. lets say you may want it to be that the mood light could change colour according to temperature and lighting
  • arduino, RGB LED, some LDR for surrounding Light, and LM35 for temperature
  1. say that the mood light change colour depending on the duration
    -arduino, RGB LED and some Critical Programming Thinking (bonus mark if you dont use delay)
  2. By here you actually have great command of how to use the Arduino and control of RGB LED, what next ? try to control the lighting using serial command
  • some hints, use the example to guide you its a treasure, finalise the control method
    I personally Prefer the xxx/yyy/zzz/ method where as xxx is the Red pwm value, yyy is the Green pwm value and zzz is the Blue PWM value and using "/" as my delimiter
    but i have also seen this method too Rxxx/ Gyyy/ Bzzz/ this way you could send an identifier first then followed by the value and finally a delimiter. This keep the communication as short as posibble.
    a few thing you need to remember is that even if in serial you send 45, To the arduino, your sending a separate 4 and 5 not 45. and the receive value is in ASCII, the hints here is to somehow change ASCII to int. one more thing remember to proper variable type.
  1. Test the BLE shield, test the shield library and get the feel of how it work, and download the app for iOS/android,play around with it.
  2. download the API and work it into an iOS/android app.

haha I finally read the product page, I thought it used the RX(pin0) TX(pin1) serial communication, it seem that it uses Application Controller Interface (ACI) protocol, that almost identical to SPI protocol,

Hi !

Thanks for your answer.
I've started to do some tests for the project. You're right that I need to buy the shield and to test it to see if it's really what I need. The problem is that I've read a negative opinion about it. Does anyone know if it's a good product ?
I don't if buying a shield is the only solution to work with arduino and bluetooth. Is there an other / a better one ?
(Here again the link of the BLE shield : http://redbearlab.com/bleshield/)

I believe some of the Bluetooth devices cannot work with Apple systems, but I don't have any Apple stuff so I can't suggest anything.

Once you have a working Bluetooth connection you will need some software on your phone (or tablet) that can send a character to the Arduino. You can devise any code you like for which character is associated with the different effects you want.

The examples in serial input basics illustrate simple reliable ways to receive data.

You may find something useful in planning and implementing a program.

Have fun.

...R