Shop OBEX P1 Docs P2 Docs Learn Events
PropBLE-LED a propeller-based project: iPad controlling LED Array via BTLE — Parallax Forums

PropBLE-LED a propeller-based project: iPad controlling LED Array via BTLE

Stephen MoracoStephen Moraco Posts: 316
edited 2014-04-11 18:54 in Propeller 1
Hi Friends,

I'm posting a link to my latest project in the works. I'm always developing boards using the Propeller but this one is a new twist for me. This is my first of what I hope to be a series of projects, which from now on, should be controlled from my mobile devices. I am an amateur radio guy (but software engineer, professionally) teaching myself to design and build digital boards with a lot of coaching/help from my friends (some of you are here on this forum!) I am retired from the software engineering business as of a couple of years ago now and am freelancing as an iOS developer (writing applications for iPhones, iPads, iPods...) The posts for this project at my blog show the hardware design with references to the specific devices I'm using. It also goes into the pattern I'm exploring on the mobile side of things. While the examples I'm showing on the mobile side are specific to iOS there is no reason why they couldn't be applied to the Android/Windows platforms if that's your thing. There will be code for iOS avail. from Github but there are copious diagrams to get the point across without your needing to delve into the code.

Why am I posting this here? Good question! If you'd like to experiment with Bluetooth LE (Low Energy) this project offers proof of concept that it can be done and works well with the prop! The schematics show one example of how to hook up one of the more common Bluetooth radios to the prop. The example code for my hardware shows you how I was able to interact with the hardware. The blog post describes my hardware so you know what is needed in terms of support circuitry and how I was able succeed. My blog posts should also help explain at least one way to think about the services and characteristics needed to be defined for working with the BTLE and so much more. In short, i'm hoping that this will serve as a leg-up for those of you wanting to play with BTLE and our Prop!

My project blog-posts: PropBLE-LED Project Blog - this links to the hardware & prop stuff.
[Links from here also take you to the mobile side of things and will go (after I write the post, later this month) to a further description of the BTLE GATT configuration choices I made for the project.]

I've started with diagrams, photo's and even a video but there is much more to come! If there are things you'd like me to comment on regarding the project feel free to post to this thread and I'll answer here and update the blog if it makes sense to do so.

Planned additions to the BLOG and elsewhere:
- My schematics available for reference (from blog)
- Sample code for my hardware avail. for reference (from blog)
NOTE: I've just gotten past my prototype actually working so the code is not quite in the shape I'd like it to be... but if needed I might be convinced to post a draft version of this code ;-)
- Objects for BLE112, displaying scrolling text and objects for various chips controlling RGB LED strings posted to OBEX if they haven't already been contributed by somebody else.
- Description of GATT setup for this hardware and why I made some of the choices
- Identification of tools I use
- .... I'm sure there will be more .... ;-)

I hope you enjoy the PropBLE-LED project blog posts!

Regards,
Stephen, KZ0Q
--

Comments

  • TubularTubular Posts: 4,703
    edited 2014-04-10 19:54
    Great write-up so far, Stephen. I did enjoy reading it. Your boards looks pretty neat too.

    I have started a project doing something similar. I am looking at using the Panasonic bluetooth modules (PAN1721), or perhaps the Laird BL600 ones that might be easier to solder. My focus is really control from a PC, but if I do anything on a mobile device it would be android. I like the way you've set up your project interfaces so you can adapt to whatever becomes available.

    The prop does a great job of driving these led strips. I have received some WS2821's (dmx) and hope to get the prop driving these, too.

    regards
    Lachlan
  • dgatelydgately Posts: 1,630
    edited 2014-04-11 08:14
    Thanks Stephen!

    Your article is inspiring me to go further with my iOS app! Your webpage has some other articles that I'm intrigued with, as well.

    dgately
  • Stephen MoracoStephen Moraco Posts: 316
    edited 2014-04-11 11:48
    Lachlan,

    I'm glad you enjoyed reading the posts, thanks for taking the time to say so. There's much more to come!
    Tubular wrote: »
    I have started a project doing something similar. I am looking at using the Panasonic bluetooth modules (PAN1721), or perhaps the Laird BL600 ones that might be easier to solder. My focus is really control from a PC, but if I do anything on a mobile device it would be android. I like the way you've set up your project interfaces so you can adapt to whatever becomes available.

    The prop does a great job of driving these led strips. I have received some WS2821's (dmx) and hope to get the prop driving these, too.

    Interesting that you should say, from a PC... One of the things we do as iOS developers is to attach a Bluetooth USB Dongle to our MAC's USB port... In my case i used the Cirago Bluetooth 4.0 USB Mini Adapter (BTA8000). I then talk directly from the MAC Xcode Simulator to my hardware. This way I can test my iOS app without even having to run it on my iPad or iPhone. Something like this might might work for you but I don't know which USB BTLE Radio is best for Windows use. (I do know that there are more that don't work on the MAC due to driver issues than do!)

    Re: the WS2821's I believe there is already an object in the Object Exchange that drives these LEDs... if you haven't found it you might start from there. Also, I have a string of these, too, so I'll be bringing out the big-gun analyzers to see how fast I can drive them... I'm planning on doing fast "memory to LED string" drivers for all of these types so we can get best frame rates on them. Who knows maybe one the other of us on this forum will be able actually display video on a matrix of these LEDs since we can easily get to 30, even 60Frames/Sec. with them! (my little 10x9 3m string clocks in at 180FPS.)

    One thing I didn't mention is that my boards have a peer-to-peer connection capability for which I haven't yet written the code... since each can drive two strings of LEDs, when I start ganging them it should get interesting... Oh, the possibilites!!! ;-)

    Regards,
    Stephen, KZ0Q
  • Stephen MoracoStephen Moraco Posts: 316
    edited 2014-04-11 11:53
    dgately,
    dgately wrote: »
    Your article is inspiring me to go further with my iOS app! Your webpage has some other articles that I'm intrigued with, as well.

    That's why I write these... in the hopes that I can help more of us continue with our learning as we "play". Watch for actual code iOS to appear shortly, too. I'm glad to hear these are useful in some way to you, Thanks!

    -Stephen, KZ0Q
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-04-11 18:54
    By coincidence a notice came yesterday from Seeedstudio that they again have the BLEBee back in stock after a long absence. That is one that drops into an XBee socket, and I see it uses the same BlueGiga 112 module you are working with on your custom board. So awesome, I think I might have a relatively painless way to follow along. My Prop boards have an XBee socket, and I'd like more about BLE. Do you think that the BLEBee has the wherewithal?

    Here is a link back to Dennis' thread, iOS-to-Propeller-programming-proof-of-concept?
Sign In or Register to comment.