9 Replies Latest reply on Dec 8, 2015 2:55 AM by JoMe_264151

    how to collect  data


      Hi !
      I can`t find any information how to collect  data inside chip and send it to host when it`s connected.
      Please any examples or code.

        • 1. Re: how to collect  data

          As usual: That depends.


          PSoC chips are so universal, you will have to specify for us what (kind of) data you want to collect (Digital, analog, with what frequency etc) and what your host is, what kind of interface you prefer, who much data, how long....





          • 2. Re: how to collect  data

            Hm, if it`s so universal it`s must be universal code ! Aren`t ?


            I talk about device like  sport bracelet that collect many parameters (blood pressure, distance I made...) when I outside and when I`l back home it`s send to smart device for statistic. 

            • 3. Re: how to collect  data

              Hm, if it`s so universal it`s must be universal code ! Aren`t ?


              Yes and no, the code reflects what you want to do.


              You probably do not need all the internal hardware components at the same time...


              You will need some sensors for what you want to have measured. From pressure sensors to GPS, you can attach what you need to. For getting a feeling on how to, I would suggest you to get hands on a BLE Pioneer Kit





              • 4. Re: how to collect  data

                I ordered kits and it`s shipped. I just search for piece of code with some sensor store data.


                BTW C language  you use a little different that I know. Please provide link to manual or give me a name for google it.

                • 5. Re: how to collect  data

                  --> C-Manual<--  It is C-Language, not C++ for PSoCs and it is not different from anything else, using GCC.


                  There are plenty of examples for a lot of different uses. When you install the Kit CY8CKIT-044 -M Pioneer data (you can do that without having the board) you will find some Kit-examples using accelerometer, light and temperature sensor connections.





                  • 6. Re: how to collect  data

                    I checked all examples exist in c:\Program Files\Cypress\PSoC Creator\3.3\PSoC Creator\examples\


                    No one not include how to collect  sensor data (it`s mean not only current value) inside chip and send it to host when it`s connected. 


                    Please don`t answer - look there . Just find and provide link or code.

                    • 7. Re: how to collect  data



                      you are right, AFAIK there is no specific example of collecting data and sending it to host PC 'once connected', but there are many projects which cover specific tasks. In your case that would be (i) receiving data from sensors (e.g. GPS, temperature etc.); (ii) storing data (in flash, FRAM, SD card, ...); (iii) communication with host PC (USB, BT,...); (iv) retrieval data from PSoC; (v) writing host application for PC.  That is quite a bit for a starter, so you need to take your time and work out steps (i)-(v) peace-by-peace.


                      PSoC4 -044 kit is very good and affordable target, having 1Mbyte of FRAM it can solve your data storage problem (and for that Cypress has example of writing to/reading from FRAM). But good starting point would be simply attaching your selected sensors to PSoC and testing them - while doing so you will get acquainted to PSoC and many questions will solve themselves by the virtue of time. 

                      • 8. Re: how to collect  data

                        As you understand it`s not trivial but basic task for using BLE. If I have some sensors it must have possibility to work "offline" and provide information by request. But ALL examples work only online. I`m beginner and creating custom project will get many time and may be unsuccessfully but company provided chip can make it a lot of time faster. 


                        I ask to open request to create at least one example of this functionality.


                        For example with Pioneer Kit I will touch CapSense on different tiles and led will flash with different colors. All this touches will store to internal flash and after connecting to host will print to terminal window.

                        • 9. Re: how to collect  data

                          You are talking about something named "Data Logger": Collecting data, optionally put a timestamp on them and when a connection is established have them sent over the air.


                          This are two independent tasks which you will have to program:


                          The datalogger: Good practice would be to set the clock after an initial connection to maintain the timestamps correctly


                             On BLE Pioneer you will find some FRam connected via I2C which you may use to store the information collected.


                             Collecting the data on a regular time-base (once every second or minute... )


                          The BLE connection:


                          When connection is established (and time is synchronized) the available data collected is sent over to the receiver and deleted when sent.


                          You can program and test each of the tasks independently. When needing further help, do not hesitate to ask.