I'm doubtful that this exists, since current APIs use an OS serial port. But may be possible to lash something together. Also be aware that some Arduino's have a 'host' mode usb port, where the dongle can plug in. Or there may be a 'usb host shield' available.
Hi @wjcroft
Thanks for the links, im pretty new to this space so i dont really have much understanding on API's, however host mode is interesting. Regardless, I think these are secondary and tertiary options as OpenBCI has a specific networking option via serial so there is no reason i cannot get this operational.
Yes OpenBCI_GUI Networking Widget can export a serial stream to Arduino. That would be the recommendation. Implementing the complex Bluetooth BLED112 protocol on Arduino, would be much more work.
I might also suggest that Arduino microcontrollers are generally underpowered, compared to newer alternatives such as Raspberry Pi (which has built in usb host support for usb serial), or ESP32, etc.
@wjcroft said:
Yes OpenBCI_GUI Networking Widget can export a serial stream to Arduino. That would be the recommendation. Implementing the complex Bluetooth BLED112 protocol on Arduino, would be much more work.
I might also suggest that Arduino microcontrollers are generally underpowered, compared to newer alternatives such as Raspberry Pi (which has built in usb host support for usb serial), or ESP32, etc.
Oh sorry, I think this is the crux of my confusion actually! You said implementing complex Bluetooth BLED112 Protocol on arduino is hard? what do you mean by this. My understanding of this is the ganglion streams to the bluetooth dongle, and i should be able to simply just pick up the serial information from arduino with serial read right? Or is is more complex than that as i think you are saying? Sorry if these are really silly questions !
My understanding of this is the ganglion streams to the bluetooth dongle, and i should be able to simply just pick up the serial information from arduino with serial read right?
No. The BLED112 usb serial port dongle (used by Ganglion) is very very complex to talk to with code. That is why the Brainflow library could help on a platform such as Raspberry Pi, because it supports the languages and serial ports used by Brainflow. Arduino on the other hand is much more limited.
In the case of the 'Focus' example, sent from the GUI Networking Widget, the GUI is doing the hard work of talking to the BLED112 serial port. It does this by calling on the Brainflow library routines. GUI widget then does the appropriate signal processing, and sends the result out on a serial port to your Arduino. Thus Arduino is insulated from having to talk directly to the BLED112. BLED112 serial port protocol is very very complex, as mentioned previously.
If you switch your microcontroller to the very inexpensive Raspberry Pi, then Brainflow libraries can run on the Pi. But Brainflow libraries would not likely run on the Arduino, since it is so limited.
Oh ok so it too uses brainflow libraries! I am hesitant to switch to my raspberry pi as my python skills are limited.
I still don't get however, if the Focus example was run on an Arduino, my programme should work too without the Brainflow libraries as the instructions dont specify you need this. Is it because its a different type of data (I assume focus uses boolean truth) whereas i am looking for stream of more bits of integers?
Sorry so to make that concise: I cant reconcile why the serial stream of focus data works but my emg data does not, I want to output to the serial port the same way they do it but just different numbers.
The step above configures the GUI Networking Widget to output a converted (signal processed) serial port data stream to the Arduino. The Arduino is NOT, repeat NOT, getting the raw BLED112 data stream. Instead the GUI + Brainflow is talking to the dongle, and converting the result to a simplified form the Arduino can process.
Networking Widget can produce various types of output streams.
I split this discussion about Arduino access to Ganglion data, onto a new separate thread. Previous thread was regarding OS access to BLED112, via Brainflow.
Ok I understand. I also think i see the confusion in regards to my query haha; I want the simplified/processed data on my arduino outputting to the servos! Of which i am receiving data but unsure whether its even what i want! Sorry i hope this is more useful!
I am hesitant to switch to my raspberry pi as my python skills are limited.
The Brainflow library, if used on Raspberry, can be programmed in a variety of languages, including C++, which is just C with objects. The example code shows the calls.
Ok thank you for all of this, but again i'd like to keep this a backup option for now: If we could revisit the conversation about transmitting the processed, simplified data to arduino like the focus does shouldn't that work for my emg data?
The step above configures the GUI Networking Widget to output a converted (signal processed) serial port data stream to the Arduino. The Arduino is NOT, repeat NOT, getting the raw BLED112 data stream. Instead the GUI + Brainflow is talking to the dongle, and converting the result to a simplified form the Arduino can process.
Networking Widget can produce various types of output streams.
Comments
Hi Shanti,
Did you manage to get this working? I am too stuck with transmitting emg data over serial com port to my arduino!
Best Wishes,
Rishan
@rishannp, hi.
Please ask your question about Brainflow for Arduino, on the Brainflow Slack channel. Instructions for joining on the first link.
https://brainflow.ai/
https://brainflow.readthedocs.io/en/stable/
I'm doubtful that this exists, since current APIs use an OS serial port. But may be possible to lash something together. Also be aware that some Arduino's have a 'host' mode usb port, where the dongle can plug in. Or there may be a 'usb host shield' available.
Regards, William
Hi @wjcroft
Thanks for the links, im pretty new to this space so i dont really have much understanding on API's, however host mode is interesting. Regardless, I think these are secondary and tertiary options as OpenBCI has a specific networking option via serial so there is no reason i cannot get this operational.
Thanks
Yes OpenBCI_GUI Networking Widget can export a serial stream to Arduino. That would be the recommendation. Implementing the complex Bluetooth BLED112 protocol on Arduino, would be much more work.
I might also suggest that Arduino microcontrollers are generally underpowered, compared to newer alternatives such as Raspberry Pi (which has built in usb host support for usb serial), or ESP32, etc.
Oh sorry, I think this is the crux of my confusion actually! You said implementing complex Bluetooth BLED112 Protocol on arduino is hard? what do you mean by this. My understanding of this is the ganglion streams to the bluetooth dongle, and i should be able to simply just pick up the serial information from arduino with serial read right? Or is is more complex than that as i think you are saying? Sorry if these are really silly questions !
No. The BLED112 usb serial port dongle (used by Ganglion) is very very complex to talk to with code. That is why the Brainflow library could help on a platform such as Raspberry Pi, because it supports the languages and serial ports used by Brainflow. Arduino on the other hand is much more limited.
https://www.silabs.com/wireless/bluetooth/bluegiga-low-energy-legacy-modules/device.bled112
The Cyton dongle on the other hand, is just a usb serial port data stream, so it is easy to parse.
Oh ok right, however that raises another question: How does the Arduino Focus experiment work then as it also streams Focus information over bluetooth from Ganglion to Arduino? Surely if that project can do it, sending serial information to the arduino com port shouldn't be so dissimilar right? I hope my thinking is right but again thanks for the help!
https://docs.openbci.com/docs/07Examples/FocusArduino
https://www.instructables.com/Send-Focus-Data-From-OpenBCI-GUI-to-Arduino/
In the case of the 'Focus' example, sent from the GUI Networking Widget, the GUI is doing the hard work of talking to the BLED112 serial port. It does this by calling on the Brainflow library routines. GUI widget then does the appropriate signal processing, and sends the result out on a serial port to your Arduino. Thus Arduino is insulated from having to talk directly to the BLED112. BLED112 serial port protocol is very very complex, as mentioned previously.
If you switch your microcontroller to the very inexpensive Raspberry Pi, then Brainflow libraries can run on the Pi. But Brainflow libraries would not likely run on the Arduino, since it is so limited.
Oh ok so it too uses brainflow libraries! I am hesitant to switch to my raspberry pi as my python skills are limited.
I still don't get however, if the Focus example was run on an Arduino, my programme should work too without the Brainflow libraries as the instructions dont specify you need this. Is it because its a different type of data (I assume focus uses boolean truth) whereas i am looking for stream of more bits of integers?
Sorry so to make that concise: I cant reconcile why the serial stream of focus data works but my emg data does not, I want to output to the serial port the same way they do it but just different numbers.
Again, thank you for your patience!
https://docs.openbci.com/docs/07Examples/FocusArduino#step-4---start-streaming
The step above configures the GUI Networking Widget to output a converted (signal processed) serial port data stream to the Arduino. The Arduino is NOT, repeat NOT, getting the raw BLED112 data stream. Instead the GUI + Brainflow is talking to the dongle, and converting the result to a simplified form the Arduino can process.
Networking Widget can produce various types of output streams.
https://docs.openbci.com/docs/06Software/01-OpenBCISoftware/GUIWidgets#networking
@rishannp, hi.
I split this discussion about Arduino access to Ganglion data, onto a new separate thread. Previous thread was regarding OS access to BLED112, via Brainflow.
William
Ok I understand. I also think i see the confusion in regards to my query haha; I want the simplified/processed data on my arduino outputting to the servos! Of which i am receiving data but unsure whether its even what i want! Sorry i hope this is more useful!
The Brainflow library, if used on Raspberry, can be programmed in a variety of languages, including C++, which is just C with objects. The example code shows the calls.
https://brainflow.readthedocs.io/en/stable/UserAPI.html
https://brainflow.readthedocs.io/en/stable/Examples.html#id1
Raspberry also has various servo libraries.
https://www.google.com/search?q=raspberry+servo+library
Ok thank you for all of this, but again i'd like to keep this a backup option for now: If we could revisit the conversation about transmitting the processed, simplified data to arduino like the focus does shouldn't that work for my emg data?
Thanks