Data Streaming to SD Card without PC and Dongle

edited April 2016 in Cyton

I am looking for a way to start data streaming in the OpenBCI
32 bit board with the help of an external input (a push button etc.) so that the
data gets stored in the SD Card. Having done that, it will eliminate the need
of connecting the board to a PC via USB Dongle. Can anyone tell what
modifications have to be made to the .ino file available on GitHub? Also, can a
push button be attached to the unused pins available on the board?

I need quick help please :(


Comments

  • biomurphbiomurph Brooklyn, NY
    There is a pushbutton on the 32bit board that you can use to control the recording of EEG data. There is a tutorial on external triggers that will give you a head start on reading in the button press.
    I would also think it would be good to blink the LED when you are recording, so you have some feedback there and know it's happening.
    You could do a modulo on the sample number, and toggle the LED to do that.
  • Can the on board push button be used for this purpose?
    I mean, that button remains high as long as it is pressed and inserts a trigger in the data stream. So if we use it to turn on the board without any PC or dongle, will it remain long only when the button is pressed?

  • biomurphbiomurph Brooklyn, NY
    The software that runs on the board in reconfigurable, so you can develop code that will use the pushbutton for numerous things.
  • edited April 2016
    [original thread: Using openbci without keeping connecting with computer]

    Hi

    I am trying to measure the emg data by openbci for a long-term period. Since using "openbci gui" is required to keep connecting to the computer, the openbci will stop acquiring data once the connection is stopped. 
    I found "OpenBCI_32-write-to-DS-only"( https://github.com/OpenBCI/OpenBCI_32-write-to-DS-only) to control the openbci by sending commands and was able to upload to the openbci, but now I am wondering how to run this firmware? Is there any existing programming I can use or tutorial to solve this problem? 

    Thank you in advance for any help or suggestions.
  • wjcroftwjcroft Mount Shasta, CA
    @pkgravity, hi. I merged your question into this existing thread.

    You will need to mod your firmware to use the button, switch, or external io pins to control starting / stopping your sd card data collection. Perhaps you could usurp the PC / BLE switch to control this. When in PC position, it operates as usual. When in BLE position, it waits for your button press or io pin closure to start collection. A second press would then stop the recording and finish writing out the last sdcard block. Does that make sense? You can use the LED to indicate operational status.

    @asd76 might have some thoughts, since he is already looking at this. You can also send a private message to him by pressing on his username.

    If you are recording at a high sample rate also see related thread,


    and


    William

  • edited April 2016
    I am a little confused about the PC / BLE switch. Do you mean I can upload external_trigger firmware while openbci switching to BLE? I basically followed external trigger tutorial and It could be uploaded successfully. But.....I am not able to initialize openbci gui anymore. I also upload back to the original openbci 32bit firmware and it still doesn't work. Is there any possible reason? or do I need to reinstall openbci radio? 

    I got this warning during uploading:
    Board arduino:RFduino:RFduino doesn't define a 'build.board' preference. Auto-set to: RFDUINO_RFDUINO
    Does it matter?

  • wjcroftwjcroft Mount Shasta, CA
    @pkgravity, hi.

    Joel @biomurph may have a suggestion on your current situation with the error message. Sounds like your chipKIT IDE may be misconfigured. Reloading the stock firmware should return everything to normal. But even with the external trigger firmware loaded, the GUI should still operate. Mysterious. Here's a thread all about uploading tips.

    http://openbci.com/forum/index.php?p=/discussion/208/chipkit-uploading-tips-restarting-bootloader/p1

    ---

    My suggestion about usurping the BLE / PC switch position was just a suggestion. It's currently just used as an on/off switch. None of the current firmware checks to see which position it is in, PC or BLE. As there is no BLE code in the stock firmware. This means you could repurpose the switch or a combination of button presses to flag your special operation mode of recording direct to SDcard without streaming to PC. (PC = operate as normal, streaming to PC;  BLE = get ready to record direct to SDcard when button is pressed; 2nd press stops recording.)

    William

  • biomurphbiomurph Brooklyn, NY
    @pkgravity
    We don't currently have the PC/BLE switch implemented. That means that it makes no difference to our stock firmware if you switch to PC or BLE, it will simply turn on the board. What happens when you switch, is that a pin on the RFduino is either pulled high or low depending on the position of the power switch, This gives the ability of the RFduino to poll this pin on startup, and either run the GZLL stack or the BLE stack, for user use.

    The error you are getting makes it sound like you are reprogramming the RFduino. Is that the case? We don't have special RFduino code for the trigger example...
Sign In or Register to comment.