Ganglion sending Focus data to Arduino via serial port / not working

MdSakibulAlamMdSakibulAlam Bangladesh
edited October 2018 in OpenBCI_GUI
I am trying pass ganglion eeg focus data to arduino using networking widget,Baud 115200 and Port COM3 selected and Arduino's Rx led is blinking but the led i use for response is not working.

Thanks

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Sakibul, hi.

    There are a few ways you can debug this, are you familiar with working with serial ports? It requires using what is called a "terminal emulator". This is an app that emulates the old style serial port 'terminal's. Keys you type are sent out the serial port. And data received on the serial port are shown in the terminal window. There is a terminal emulator built into the Arduino IDE. And other terminal apps are available.

    With such an emulator you could double check what ascii characters are being sent out from the GUI via the serial port. Requires a 2nd laptop with appropriate serial port and cables. (Transmit / receive lines need to be switched in the cable, what is called a 'null' modem.)

    Conversely, you could connect the emulator to your arduino, and try simulating the different values that the Focus widget sends out.

    William



  • Hi,
    Using network widget i am trying value to ardunio,the problem is when i select TimeSerise,FFT in Data Type the connected led begins blinking that means some value is passing but when select Focus the led stops blinking.Is there any problem with Focus Widget?

    Thanks

    Here is my Ardunio Code:
    void setup() {
      // put your setup code here, to run once:
      Serial.begin(115200);
      pinMode(13, OUTPUT);
      
    }



    void loop() {
      // put your main code here, to run repeatedly:
      if(Serial.available()){
        
      int state = Serial.parseInt();
      
        if((state == 1)){
          digitalWrite(13, HIGH);
          }
       if((state == 0)){
          digitalWrite(13, LOW);
          }
         }
    }


  • wjcroftwjcroft Mount Shasta, CA
    I still suggest trying some tests with terminal emulators. That is the best way to see what data is being sent, being received, acted upon. Be sure the baud rates match on both sides.
  • wjcroftwjcroft Mount Shasta, CA
    Another option for your testing and debugging is to put some test code into the widget. For example you could comment out where the actual focus state is sent, and instead send something like a square wave, with the LED on for 1 second, then off for 1 second. This would verify your serial link.


  • Hi,
    I figure out what value is gui passing to arduino,it sends true or false basis on focused sate,but now how can i use this value with arduino?

    thanks
  • Hi,
    I have go through the thread but my setup is not responding till now.What else i can do.

    Thanks
Sign In or Register to comment.