11 Replies Latest reply on May 4, 2015 12:33 AM by user_1386626

    100 Projects in 100 Days with PSoC 4 BLE

    gul

      Last year, we featured 100 projects in 100 days for the original PSoC 4 Pioneer Kit and shared many ideas with the community.

         

      We're back, kicking off yet another 100 projects effort - this time with the brand new BLE Pioneer Kit, featuring PSoC 4 BLE.

         

      PSoC 4 BLE combines and ARM Cortex-M0 CPU with a Bluetooth Low Energy radio in a single chip. It also carries all the other PSoC programmable technologies, including the analog blocks (opamps, comparators, muxes, ADC), digital blocks (tcpwm, scb, usb), and of course, the industry's best CapSense touch-sensing technology - allowing designers to create the latest wearables and sensor-based gadgets for the Internet of Things.

         

      Adding BLE capabilities to your embedded system has never been easier! With the new BLE Component, you can easily choose from the included BLE GATT Adopted Profiles, or even use the GUI-based tool to create your own, custom Profiles.

         

      Check out the 100 Projects in 100 Days with PSoC 4 BLE blog here. All the projects are hosted in GitHub.

         

      You can download the latest PSoC Creator with support for BLE for free at www.cypress.com/PSoCCreator. 

        • 1. Re: 100 Projects in 100 Days with PSoC 4 BLE
          shari.holness

          For the Dynamic Broadcasting project, is there a way to have CySmart on the PC continuously display the changes of the data value that is being updated in the firmware? Currently I have to stop and start the scan (scanning the devices) to see the updated data value.

          • 2. Re: 100 Projects in 100 Days with PSoC 4 BLE
            user_78878863

            IIRC: If you go back to the connection screen, there is abutton to re-read all the GATT atributes (I think its called "discovery" or so).

               

            But you can also enable notifications on that data, if the firmware supports it. Just write a 0x01 to the "client characteristic descriptor" (I think the user guide explains this too).

            • 3. Re: 100 Projects in 100 Days with PSoC 4 BLE
              shari.holness

              Thanks for replying hli. When connected to a BLE device and seeing the GATT attributes listed and all, I have been able to enable notifications like you said and view the data changing on CySmart. However, since I'm broadcasting with this device and based on the configuration for the type of advertisement, I wouldn't be able to connect to it see the things you mentioned. Attached is a screenshot of what I'm seeing after I start scanning and select the device once it appears in the list.

              • 4. Re: 100 Projects in 100 Days with PSoC 4 BLE
                user_78878863

                Sorry, somehow I missed the part about broadcasts (even though it was right front...). For that it might be best to create a support case with Cypress and ask for that feature in future versions.

                   

                (Or you build it by yourself - the CySmart dongle has a PRoC BLE device as core...)

                • 5. Re: 100 Projects in 100 Days with PSoC 4 BLE
                  shari.holness

                  That's ok :) Thanks much for your input hli. I'll create a support case with Cypress soon. Maybe later on when I get more familiar and experience with all this and have more time, I can mess around with building something like that :) 

                     

                  I ended up looking for Android apps that could help me with this. I found the Nordic Master Control Panel app and I'm working with it for now to monitor the data as it changes. I still have to re-scan for devices in order to continuously see the data changing, but the scan itself lasts for about a minute so I'm able to see all that happens within a minute before having to re-scan which is sufficient for the time being.

                  • 6. Re: 100 Projects in 100 Days with PSoC 4 BLE
                    user_192504620

                     I would like to suggest a sample project that incorporates many features.  Being a newb it is much easier for me to remove than add characteristics. 

                       

                    I would suggest an app that 

                       

                    has the find me profile

                       

                    Has the battery characteristic,

                       

                    has a capsense characteristic

                       

                    has an 8 channel analog input/characteristics

                       

                    has an op-amp on one of those channels.

                       

                    has an analog output with an op amp.

                       

                    has debounced digital inputs for switch inputs with their status sent to a bit mapped button characteristic

                       

                    incorporates a character lcd over parallel and i2c with some real time analog values.

                       

                    incorporates an spi or i2c/i2s oled display with some real time analog values.

                       

                    has a digital PWM input measuring charactersistic

                       

                    has a pwm digital output.

                       

                    has the RGB led control 

                       

                    has a uart gps input

                       

                    reports die temp

                       

                    incorporates a uart over BLE with debug information

                       

                    incorporates a physical uart with debug information

                       

                    log analogs to sd card

                       

                     

                       

                    incorporate a viewer in cysmart that lets you monitor several characteristics if not all above simultaneously on the same screen

                       

                    It would be neat to be ableto configure a readout on a client from the chip.  i.e. for a given characteristic you could pick from a numeric or bargraph, a display size/region and cysmart could interpret the data as such for prototyping with no custom app needed.  Maybe allow selecting multiple characteristics for display.

                       

                     

                       

                    Maybe add the functionality to cysmart as a "robot controller" screen with buttons/joysticks and some feedback status lights/debug tx/rx textbox.

                    • 7. Re: 100 Projects in 100 Days with PSoC 4 BLE
                      user_192504620

                       More ideas:

                         

                      Fast led library support.

                         

                      https://github.com/FastLED/FastLED/wiki/Chipset-reference

                         

                      A ble ws2811 compatible driver would be awesome.  Or, perhaps a hardware block for driving led strips that takes advantage of psoc hardware.

                         

                      Ssd1306 oled display example.

                         

                      Finally an example with 4 analogs, scaled voltage output to the oled, output over serial, watched via debug and transmitted over a custom profile via notification.  Plus a writeable characteristic to allow for remote control.

                         

                       

                         

                      .

                      • 8. Re: 100 Projects in 100 Days with PSoC 4 BLE
                        user_192504620

                         And another suggestion...

                           

                        Add an arduinoish library to alias common functions in psoc to arduino compatible functions... This could make things a bit easier for those with experience on that platform.

                           

                        ie.

                           

                        analogRead()

                           

                        analogWrite()

                           

                        digitalWrite()

                           

                        digitalRead()

                           

                        serial.print()

                           

                        serialprintln()

                           

                        And, any others you would like to support.

                           

                        Good News, 

                           

                        I found a library for the WS2811 leds by adafruit.

                           

                        see here: 

                           

                        https://blog.adafruit.com/2014/11/24/neopixel-christmas-tree-made-with-the-cypresssemi-cy8ckit-042-psoc-4-pioneer-kit/

                        • 9. Re: 100 Projects in 100 Days with PSoC 4 BLE
                          gul

                           @macsboost -

                             

                          we made a UDB-based Component to control the WS2811/12 LED lights

                             

                          this can easily be ported to PSoC 4 BLE (the UDB blocks are the same)

                             

                           

                             

                          http://www.cypress.com/?rID=103610

                             

                           

                             

                          http://www.element14.com/community/thread/27131/l/psoc-4-pioneer-kit-community-project100-psoc-4-times-square-led-billboard?displayFullThread=true

                          • 10. Re: 100 Projects in 100 Days with PSoC 4 BLE
                            user_192504620

                             Thank you

                               

                             

                               

                            This is very cool.

                               

                             

                               

                            As I work through the examples, I find it difficult to follow the ble implementation.  Following the program flow from a variable to transmission is not easy.  More simplification of these tasks would be helpful.  Perhaps create another ble component with these to provide backwards compatability and add this fumctionality?creating a notification should be as simple as one line of code.  As it stands you really have to get intimate with the intricacies to make it work

                            • 11. Re: 100 Projects in 100 Days with PSoC 4 BLE
                              user_1386626

                              Another Project suggestion

                                 

                              In the previous 100 Projects in 100 Days, using the PS0c 4 Pioneer Kit,  Projects 29 ( Bluetooth Home Automation System) and Project 30 (Bluetooth with GLCD) used the Android AP called Bluetooth SPP ( now called Bluetooth SPP Pro) to control devices like LEDs, Relays, etc via the Pioneer Kit. The Bluetooth SPP basically exposed a 12button keyboard on a cell phone/tablet where each individual button could be labeled and an programmed to send user defined codes to a Pioneer Kit with a Bluetooth SPP Shield or module. I found these two projects very useful for prototyping and for moving projects quickly from Android to Windows APS using Delphi.

                                 

                              I would like to similar projects using the BLE board(s).

                                  James